public void BodyAsIAModelWithStringPropertyTest() { IAModelWithStringProperty expected = new IAModelWithStringProperty(); expected.StringProperty = "50.6"; IADeSerialization deSerialization = new IADeSerialization(); deSerialization.SetBodyWith("{\"stringProperty\":\"50.6\"}"); IAModelWithStringProperty actual = deSerialization.BodyAs <IAModelWithStringProperty>(); Assert.AreEqual(expected, actual); }
public override bool Equals(Object obj) { if (this == obj) { return(true); } if (obj == null || (obj as IAModelWithStringProperty) == null) { return(false); } IAModelWithStringProperty model = (IAModelWithStringProperty)obj; return(this.StringProperty != null && this.StringProperty.Equals(model.StringProperty)); }
public void BodyAsIAModelWithStringPropertyTest() { IAModelWithStringProperty expected = new IAModelWithStringProperty(); expected.StringProperty = "50.6"; IADeSerialization deSerialization = new IADeSerialization(); deSerialization.SetBodyWith("{\"stringProperty\":\"50.6\"}"); IAModelWithStringProperty actual = deSerialization.BodyAs<IAModelWithStringProperty>(); Assert.AreEqual(expected, actual); }