Пример #1
0
        public void SetAttribute_WithValidNewKeyAndValue_ShouldAddKeyValueToAttributes()
        {
            var node = new TagNode(_tagName);
            node.SetAttribute(_classKey, _classValue);

            Assert.AreEqual(_classValue, node.GetAttribute(_classKey));
        }
Пример #2
0
 public void SetAttribute_WithNullKey_ShouldThrowArgumentException()
 {
     var node = new TagNode(_tagName);
     node.SetAttribute(null, _classValue);
 }
Пример #3
0
        public void SetAttribute_WithValidKeyAndValue_ShouldAddValueToCurrenetAttribute()
        {
            const string value2 = "second";
            var node = new TagNode(_tagName);
            node.SetAttribute(_classKey, _classValue);
            node.SetAttribute(_classKey, value2);

            Assert.AreEqual(value2, node.GetAttribute(_classKey));
        }
Пример #4
0
 public void SetAttribute_WithEmptyStringKey_ShouldThrowArgumentException()
 {
     var node = new TagNode(_tagName);
     node.SetAttribute(string.Empty, _classValue);
 }