Пример #1
0
        public void RemoveAttributeFromElement_NullOrEmptyAttributeName_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.RemoveAttribute(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Пример #2
0
        public void RemoveAttributeFromElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var attributeName = "attribute";

            Action action = () => Taconite.RemoveAttribute(attributeName).From(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Пример #3
0
        public void RemoveAttributeFromElement()
        {
            var attributeName = "attribute";
            var selector      = "#selector";

            var result = Taconite.RemoveAttribute(attributeName).From(selector);

            result.Commands.Should().HaveCount(1);
            var command = result.Commands.Single();

            command.As <NonElementCommand>()
            .Should().NotBeNull()
            .ShouldHave().SharedProperties().EqualTo(new
            {
                Command  = "removeAttr",
                Selector = selector
            });
            command.As <NonElementCommand>().Arguments.Should().HaveCount(1)
            .And.Contain(attributeName);
        }
Пример #4
0
 public TaconiteResult RemoveAttribute()
 {
     return(Taconite.RemoveAttribute("title").From("#removeAttributeImage"));
 }