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

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

            Assert.AreEqual(expected, actual);
        }