Exemplo n.º 1
0
 protected bool Equals(DefinedByConcreteProperty other)
 {
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(MyString, other.MyString) && MyInt == other.MyInt);
 }
Exemplo n.º 2
0
        public void SchemaInConcretePropertyPasses()
        {
            var json = new JsonObject
            {
                ["MyString"] = "some string",
                ["MyInt"]    = 15
            };
            var expected = new DefinedByConcreteProperty
            {
                MyString = "some string",
                MyInt    = 15
            };

            var actual = new JsonSerializer().Deserialize <DefinedByConcreteProperty>(json);

            Assert.AreEqual(expected, actual);
        }