public void RemoveAttributeFromElement_NullOrEmptyAttributeName_ThrowsArgumentNullException( [Values(null, "")] string selector) { Action action = () => Taconite.RemoveAttribute(selector); action.ShouldThrow <ArgumentNullException>(); }
public void RemoveAttributeFromElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var attributeName = "attribute"; Action action = () => Taconite.RemoveAttribute(attributeName).From(selector); action.ShouldThrow <ArgumentNullException>(); }
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); }
public TaconiteResult RemoveAttribute() { return(Taconite.RemoveAttribute("title").From("#removeAttributeImage")); }