Beispiel #1
0
        public void AppendPartialViewToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.AppendPartialView().To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Beispiel #2
0
        public void AppendPartialViewToElement_ViewNameAndModelNotSpecified()
        {
            var selector = "#selector";

            var result = Taconite.AppendPartialView().To(selector);

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

            command.As <ElementCommand>()
            .Should().NotBeNull()
            .ShouldHave().SharedProperties().EqualTo(new
            {
                Command  = "append",
                Html     = (string)null,
                Selector = selector
            });
            command.As <ElementCommand>().Partial.Model.Should().BeNull();
            command.As <ElementCommand>().Partial.View.Should().BeNull();
        }
Beispiel #3
0
 public TaconiteResult Append()
 {
     return(Taconite.AppendPartialView("GreenBox").To("#appendTarget"));
 }