public void ConfigurationNodeMergeDataCanGetPropertiesThatHaveBeenSet() { ConfigurationNodeMergeData mergeData = new ConfigurationNodeMergeData(); mergeData.SetPropertyValue("propertyName", "propertyValue"); string propertyValue = mergeData.GetPropertyValue("propertyName", typeof(string), null, null) as string; Assert.AreEqual("propertyValue", propertyValue); }
public void ValueIsDeserializedOnGet() { ConfigurationNodeMergeData mergeData = new ConfigurationNodeMergeData(); mergeData.SetPropertyValue("propertyName", new UnserializedPropertyValue("123")); int propertyValue = (int)mergeData.GetPropertyValue("propertyName", typeof(int), 0, null); Assert.AreEqual(123, propertyValue); }
public void GettingValueAfterResetReturnsDefaultValue() { ConfigurationNodeMergeData mergeData = new ConfigurationNodeMergeData(); mergeData.SetPropertyValue("propertyName", "propertyValue"); mergeData.ResetPropertyValue("propertyName"); string propertyValue = mergeData.GetPropertyValue("propertyName", typeof(string), "default", null) as string; Assert.AreEqual("default", propertyValue); }