Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }