public void RemoveClassFromElement_NullOrEmptyClassName_ThrowsArgumentNullException( [Values(null, "")] string className) { Action action = () => Taconite.RemoveClass(className); action.ShouldThrow <ArgumentNullException>(); }
public void RemoveClassFromElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var className = "class"; Action action = () => Taconite.RemoveClass(className).From(selector); action.ShouldThrow <ArgumentNullException>(); }
public void RemoveClassFromElement() { var className = "class"; var selector = "#selector"; var result = Taconite.RemoveClass(className).From(selector); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <NonElementCommand>() .Should().NotBeNull() .ShouldHave().SharedProperties().EqualTo(new { Command = "removeClass", Selector = selector }); command.As <NonElementCommand>().Arguments.Should().HaveCount(1) .And.Contain(className); }
public TaconiteResult RemoveClass() { return(Taconite.RemoveClass("blue").From("#removeClassTarget .example-block")); }