public void Save_ShouldNotSaveValueToAttribute_WhenValueIsNullOrEmpty(string value) { XmlDocument xmlDoc = new XmlDocument(); XmlElement appender = xmlDoc.CreateElement("appender"); mSut.Value = value; mSut.Save(xmlDoc, appender); Assert.IsNull(appender.Attributes["type"]); }
public void Save_ShouldSaveValueToAttribute() { XmlDocument xmlDoc = new XmlDocument(); XmlElement appender = xmlDoc.CreateElement("appender"); const string value = "type"; mSut.Value = value; mSut.Save(xmlDoc, appender); Assert.AreEqual(value, appender.Attributes["type"].Value); }