public void Load_ShouldNotSetValue_WhenAttributeValueDoesNotExist() { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml("<appender>\r\n" + " <datePattern />\r\n" + "</appender>"); mSut.Load(xmlDoc.FirstChild); Assert.IsNull(mSut.Value); }
public void Load_ShouldSetCorrectValue() { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml("<appender>\r\n" + " <datePattern value=\"yyyyMMdd\" />\r\n" + "</appender>"); mSut.Load(xmlDoc.FirstChild); Assert.AreEqual("yyyyMMdd", mSut.Value); }