public void DefinitionSiteSerialization_NullValues()
        {
            var obj = new DefinitionSite
            {
                kind   = DefinitionSiteKind.THIS,
                field  = null,
                method = null
            };

            var json = "{" + Environment.NewLine +
                       "    \"kind\": \"THIS\"" + Environment.NewLine +
                       "}";

            var actualJson = obj.ToFormattedJson();

            Assert.AreEqual(json, actualJson);
            var other = json.ParseJsonTo <DefinitionSite>();

            Assert.AreEqual(obj, other);
        }
        public void DefinitionSiteSerialization_DefaultArgIndexIsNotSerialized()
        {
            var obj = new DefinitionSite
            {
                kind   = DefinitionSiteKind.THIS,
                field  = Names.Field("[F,P] [T,P].f").ToCoReName(),
                method = Names.Method("[R,P] [T,P].M()").ToCoReName()
            };

            var json = "{" + Environment.NewLine +
                       "    \"kind\": \"THIS\"," + Environment.NewLine +
                       "    \"field\": \"LT.f;LF\"," + Environment.NewLine +
                       "    \"method\": \"LT.M()LR;\"" + Environment.NewLine +
                       "}";

            var actualJson = obj.ToFormattedJson();

            Assert.AreEqual(json, actualJson);
            var other = json.ParseJsonTo <DefinitionSite>();

            Assert.AreEqual(obj, other);
        }