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

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