public void AddClassesToElement_NoClassNames_ThrowsArgumentNullException() { var selector = "#selector"; Action action = () => Taconite.AddClasses().To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void AddClassesToElement_NullOrEmptySelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var className = "class"; Action action = () => Taconite.AddClasses(className).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void AddClassesToElement_SingleClass() { var className = "class"; var selector = "#selector"; var result = Taconite.AddClasses(className).To(selector); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <NonElementCommand>() .Should().NotBeNull() .And.ShouldHave().SharedProperties().EqualTo(new { Command = "addClass", Selector = selector }); command.As <NonElementCommand>().Arguments.Should().HaveCount(1) .And.Contain(className); }