/// <inheritdoc /> public IBaseTestBuilderWithViewComponentResult <TInvocationResult> HtmlContent(Func <string, bool> predicate) { var actualContent = this.GetHtmlContentAsString(); if (!predicate(actualContent)) { throw ContentViewComponentResultAssertionException.ForPredicate( this.TestContext.ExceptionMessagePrefix, actualContent); } return(this.NewAndTestBuilderWithViewComponentResult()); }
/// <inheritdoc /> public IAndTestBuilder Content(Func <string, bool> predicate) { var actualContent = this.GetActualContent(); if (!predicate(actualContent)) { throw ContentViewComponentResultAssertionException.ForPredicate( this.TestContext.ExceptionMessagePrefix, actualContent); } return(new AndTestBuilder(this.TestContext)); }
/// <inheritdoc /> public IBaseTestBuilderWithViewComponentResult <TInvocationResult> HtmlContent(string htmlContent) { var actualContent = this.GetHtmlContentAsString(); if (htmlContent != actualContent) { throw ContentViewComponentResultAssertionException.ForEquality( this.TestContext.ExceptionMessagePrefix, htmlContent, actualContent); } return(this.NewAndTestBuilderWithViewComponentResult()); }
/// <inheritdoc /> public IAndTestBuilder HtmlContent(string htmlContent) { var actualContent = this.GetHtmlContentAsString(); if (htmlContent != actualContent) { throw ContentViewComponentResultAssertionException.ForEquality( this.TestContext.ExceptionMessagePrefix, htmlContent, actualContent); } return(new AndTestBuilder(this.TestContext)); }