Пример #1
0
        public void WhenRemoveAttributeWithEmptyName_ThenThrowException()
        {
            var target = new HtmlAttributeDictionary();

            Assert.Throws <ArgumentException>(
                () => target.Remove("")
                );
        }
Пример #2
0
        public void GivenDictionaryWithAttribute_WhenRemoveAttributeWithDifferentName_ThenReturnFalse()
        {
            var target = new HtmlAttributeDictionary {
                "test"
            };
            var removed = target.Remove("something-else");

            removed.ShouldBeFalse();
        }
Пример #3
0
        public void GivenDictionaryWithAttribute_WhenRemoveAttributeByName_ThenReturnTrue()
        {
            var target = new HtmlAttributeDictionary {
                "test"
            };
            var removed = target.Remove("test");

            removed.ShouldBeTrue();
        }