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

            action.ShouldThrow <ArgumentNullException>();
        }
예제 #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();
        }
예제 #3
0
 public TaconiteResult Append()
 {
     return(Taconite.AppendPartialView("GreenBox").To("#appendTarget"));
 }