public void PrependPartialViewResultContentToElement_NullPartialViewResult_ThrowsArgumentNullException() { var selector = "#selector"; Action action = () => Taconite.PrependContent((PartialViewResult)null).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void PrependRawHtmlContentToElement_NullHtmlContent_ThrowsArgumentNullException() { var selector = "#selector"; Action action = () => Taconite.PrependContent((string)null).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void PrependPartialViewResultContentToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var partialViewResult = new PartialViewResult(); Action action = () => Taconite.PrependContent(partialViewResult).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void PrependRawHtmlContentToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var html = "<div>Some HTML!</div>"; Action action = () => Taconite.PrependContent(html).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void PrependRawHtmlContentToElement() { var selector = "#selector"; var html = "<div>Some HTML!</div>"; var result = Taconite.PrependContent(html).To(selector); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <ElementCommand>() .Should().NotBeNull() .ShouldHave().SharedProperties().EqualTo(new { Command = "prepend", Html = html, PartialViewResult = (PartialViewResult)null, Selector = selector }); }
public void PrependPartialViewResultContentToElement() { var partialViewResult = new PartialViewResult(); var selector = "#selector"; var result = Taconite.PrependContent(partialViewResult).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, Partial = partialViewResult, Selector = selector }); }