public void SerializeTest() { YamlConverter yamlConverter = new YamlConverter(); var addrss = new Address() { City = "City", State = "State", Street = "Street" }; var value = yamlConverter.Serialize(addrss); Assert.AreEqual("street: Street\r\ncity: City\r\nstate: State\r\n", value); }
public void DeserializeTest1() { YamlConverter yamlConverter = new YamlConverter(); var addrss = new Address() { City = "City", State = "State", Street = "Street" }; var value = yamlConverter.Serialize(addrss); var actual = yamlConverter.Deserialize(value, typeof(Address)); Assert.AreEqual("City", (actual as Address).City); }