protected bool Equals(DefinedByConcreteProperty other) { if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(MyString, other.MyString) && MyInt == other.MyInt); }
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); }