public void AppendPartialViewResultContentToElement_NullPartialViewResult_ThrowsArgumentNullException() { var selector = "#selector"; Action action = () => Taconite.AppendContent((PartialViewResult)null).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void AppendRawHtmlContentToElement_NullHtmlContent_ThrowsArgumentNullException() { var selector = "#selector"; Action action = () => Taconite.AppendContent((string)null).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void AppendPartialViewResultContentToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var partialViewResult = new PartialViewResult(); Action action = () => Taconite.AppendContent(partialViewResult).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void AppendRawHtmlContentToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException( [Values(null, "")] string selector) { var html = "<div>Some HTML!</div>"; Action action = () => Taconite.AppendContent(html).To(selector); action.ShouldThrow <ArgumentNullException>(); }
public void AppendRawHtmlContentToElement() { var selector = "#selector"; var html = "<div>Some HTML!</div>"; var result = Taconite.AppendContent(html).To(selector); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <ElementCommand>() .Should().NotBeNull() .ShouldHave().SharedProperties().EqualTo(new { Command = "append", Html = html, PartialViewResult = (PartialViewResult)null, Selector = selector }); }
public void AppendPartialViewResultContentToElement() { var partialViewResult = new PartialViewResult(); var selector = "#selector"; var result = Taconite.AppendContent(partialViewResult).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, Partial = partialViewResult, Selector = selector }); }