public void PrependPartialViewToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { Action action = () => Taconite.PrependPartialView().To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void PrependPartialViewToElement_ViewNameAndModelNotSpecified() { var selector = "#selector"; var result = Taconite.PrependPartialView().To(selector); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <ElementCommand>() .Should().NotBeNull() .ShouldHave().SharedProperties().EqualTo(new { Command = "prepend", Html = (string)null, Selector = selector }); command.As <ElementCommand>().Partial.Model.Should().BeNull(); command.As <ElementCommand>().Partial.View.Should().BeNull(); }
public TaconiteResult Prepend() { return(Taconite.PrependPartialView("GreenBox").To("#prependTarget")); }