public void EmProperty_ToString_GetExpected() { const string key = "TestKey"; var testProp = new TestIntProperty(key, 1); string expectedValue = $"{key}:{1};"; Assert.AreEqual(1, testProp.Value); Assert.AreEqual(expectedValue, testProp.ToString()); }
public void EmProperty_ToAndFromString_DataPreserved() { const string key = "TestKey"; var orig = new TestIntProperty(key, 10); var deserialized = new TestIntProperty(key); string originalSerialized = orig.ToString(); deserialized.FromString(originalSerialized); string serialized = deserialized.ToString(); Assert.AreEqual(orig.Value, deserialized.Value); Assert.AreEqual(originalSerialized, serialized); }