public void BodyAsIAModelInheritanceTest() { IAModelInheritance expected = new IAModelInheritance(); expected.Number = 50; expected.NumberTwo = 60; IADeSerialization deSerialization = new IADeSerialization(); deSerialization.SetBodyWith(expected); IAModelInheritance actual = deSerialization.BodyAs<IAModelInheritance>(); Assert.AreEqual(expected, actual); }
public void SetBodyWithWithAnIAModelInheritanceTest() { IAModelInheritance model = new IAModelInheritance(); model.Number = 50; model.NumberTwo = 60; IADeSerialization deSerialization = new IADeSerialization(); deSerialization.SetBodyWith(model); Assert.AreEqual("{\"NumberTwo\":60,\"Number\":50}", deSerialization.BodyAsString()); }
public void BodyAsIAModelInheritanceTest() { IAModelInheritance expected = new IAModelInheritance(); expected.Number = 50; expected.NumberTwo = 60; IADeSerialization deSerialization = new IADeSerialization(); deSerialization.SetBodyWith(expected); IAModelInheritance actual = deSerialization.BodyAs <IAModelInheritance>(); Assert.AreEqual(expected, actual); }
public override bool Equals(Object obj) { if (this == obj) { return(true); } if (obj == null || (obj as IAModelInheritance) == null) { return(false); } IAModelInheritance model = (IAModelInheritance)obj; return((this.Number == model.Number) && (this.NumberTwo == model.NumberTwo)); }