MY TESTED ASP.NET CORE MVC DOCS
  • Tutorial
  • Testing Guide
  • API Reference
  • Troubleshoot
  • About
  • API Reference
  • MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations
  • IViewComponentShouldReturnTestBuilder<TInvocationResult>
Show / Hide Table of Contents
  • Common Classes & Extensions
    • ActionAttributesTestBuilderViewFeaturesExtensions
    • AuthenticationScheme
    • BadRequestTestBuilderDataAnnotationsExtensions
    • BadRequestTestBuilderExtensions
    • BaseShouldReturnTestBuilderExtensions
    • BaseTestBuilderWithResponseModelExtensions
    • ComponentBuilderAuthenticationExtensions
    • ComponentBuilderCachingExtensions
    • ComponentBuilderDependencyInjectionExtensions
    • ComponentBuilderEntityFrameworkCoreExtensions
    • ComponentBuilderHttpExtensions
    • ComponentBuilderOptionsExtensions
    • ComponentBuilderRoutingExtensions
    • ComponentBuilderSessionExtensions
    • ComponentBuilderTempDataExtensions
    • ComponentShouldHaveTestBuilderCachingExtensions
    • ComponentShouldHaveTestBuilderEntityFrameworkCoreExtensions
    • ComponentShouldHaveTestBuilderHttpExtensions
    • ComponentShouldHaveTestBuilderModelStateExtensions
    • ComponentShouldHaveTestBuilderSessionExtensions
    • ComponentShouldHaveTestBuilderTempDataExtensions
    • ComponentShouldHaveTestBuilderViewBagExtensions
    • ComponentShouldHaveTestBuilderViewDataExtensions
    • ContentType
    • ControllerBuilderDataAnnotationsExtensions
    • CreatedTestBuilderExtensions
    • From
    • HttpHeader
    • HttpMethod
    • HttpRequestBuilderAuthenticationExtensions
    • HttpRequestBuilderViewFeaturesExtensions
    • HttpScheme
    • HttpStatusCode
    • LocalRedirectTestBuilderExtensions
    • ModelErrorDetailsTestBuilderViewFeaturesExtensions
    • ModelErrorTestBuilderViewFeaturesExtensions
    • MyApplication
    • MyController<TController>
    • MyMvc
    • MyRouting
    • MyViewComponent<TViewComponent>
    • RedirectTestBuilderExtensions
    • ResolvedRouteTestBuilderDataAnnotationsExtensions
    • ServiceCollectionAbstractionsExtensions
    • ServiceCollectionCachingExtensions
    • ServiceCollectionControllersExtensions
    • ServiceCollectionCoreExtensions
    • ServiceCollectionEntityFrameworkCoreExtensions
    • ServiceCollectionExtensions
    • ServiceCollectionHttpExtensions
    • ServiceCollectionOptionsExtensions
    • ServiceCollectionRoutingExtensions
    • ServiceCollectionSessionExtensions
    • ServiceCollectionTempDataExtensions
    • ServiceCollectionUniverseExtensions
    • ServiceCollectionViewComponentsExtensions
    • ServiceCollectionViewFeaturesExtensions
    • ShouldReturnTestBuilderExtensions
    • ShouldReturnTestBuilderJsonResultExtensions
    • ShouldReturnTestBuilderPartialViewResultExtensions
    • ShouldReturnTestBuilderViewComponentResultExtensions
    • ShouldReturnTestBuilderViewResultExtensions
    • ViewComponentShouldReturnTestBuilderExtensions
    • With
  • ActionResults.BadRequest
    • IBadRequestErrorMessageTestBuilder
    • IBadRequestTestBuilder
  • ActionResults.Challenge
    • IChallengeTestBuilder
  • ActionResults.Content
    • IContentTestBuilder
  • ActionResults.Created
    • ICreatedTestBuilder
  • ActionResults.File
    • IFileTestBuilder
    • IPhysicalFileTestBuilder
  • ActionResults.Forbid
    • IForbidTestBuilder
  • ActionResults.Json
    • IJsonSerializerSettingsTestBuilder
    • IJsonTestBuilder
  • ActionResults.LocalRedirect
    • ILocalRedirectTestBuilder
  • ActionResults.NotFound
    • INotFoundTestBuilder
  • ActionResults.Object
    • IObjectTestBuilder
  • ActionResults.Ok
    • IOkTestBuilder
  • ActionResults.Redirect
    • IRedirectTestBuilder
  • ActionResults.StatusCode
    • IStatusCodeTestBuilder
  • ActionResults.View
    • IViewComponentTestBuilder
    • IViewTestBuilder
  • Actions
    • IActionResultTestBuilder<TActionResult>
    • IShouldHaveTestBuilder<TActionResult>
    • IShouldReturnTestBuilder<TActionResult>
    • IVoidActionResultTestBuilder
  • Application
    • IApplicationConfigurationBuilder
  • Attributes
    • IActionAttributesTestBuilder
    • IBaseAttributesTestBuilder<TAttributesTestBuilder>
    • IControllerActionAttributesTestBuilder<TAttributesTestBuilder>
    • IControllerAttributesTestBuilder
    • IViewComponentAttributesTestBuilder
  • Authentication
    • IAuthenticationPropertiesTestBuilder
    • IClaimsIdentityBuilder
    • IClaimsPrincipalBuilder
  • Base
    • IBaseTestBuilder
    • IBaseTestBuilderWithAction
    • IBaseTestBuilderWithActionResult<TActionResult>
    • IBaseTestBuilderWithComponent
    • IBaseTestBuilderWithComponentBuilder<TBuilder>
    • IBaseTestBuilderWithComponentShouldHaveTestBuilder<TBuilder>
    • IBaseTestBuilderWithController
    • IBaseTestBuilderWithInvokedAction
    • IBaseTestBuilderWithModel<TModel>
    • IBaseTestBuilderWithModelError
    • IBaseTestBuilderWithResponseModel
    • IBaseTestBuilderWithViewComponent
    • IBaseTestBuilderWithViewComponentInvocation
    • IBaseTestBuilderWithViewComponentResult<TInvocationResult>
  • CaughtExceptions
    • IAggregateExceptionTestBuilder
    • IBaseExceptionTestBuilder
    • IExceptionMessageTestBuilder
    • IExceptionTestBuilder
    • IShouldThrowTestBuilder
  • Controllers
    • IControllerBuilder<TController>
    • IControllerTestBuilder
  • Data
    • IDataProviderEntryDetailsTestBuilder<TValue>
    • IDataProviderEntryKeyTestBuilder
    • IDataProviderEntryTestBuilder
    • IDbContextBuilder
    • IDbContextTestBuilder
    • IMemoryCacheBuilder
    • IMemoryCacheEntryBuilder
    • IMemoryCacheEntryDetailsTestBuilder<TValue>
    • IMemoryCacheEntryKeyBuilder
    • IMemoryCacheEntryKeyTestBuilder
    • IMemoryCacheEntryTestBuilder
    • IMemoryCacheTestBuilder
    • ISessionBuilder
    • ISessionTestBuilder
    • ITempDataBuilder
    • ITempDataTestBuilder
    • IViewBagTestBuilder
    • IViewDataTestBuilder
  • Http
    • IHttpRequestBuilder
    • IHttpResponseTestBuilder
    • IResponseCookieTestBuilder
  • Invocations
    • IBaseShouldReturnTestBuilder
    • IBaseShouldReturnTestBuilder<TInvocationResult, TBuilder>
    • IBaseShouldReturnTestBuilder<TInvocationResult>
    • IViewComponentResultTestBuilder<TInvocationResult>
    • IViewComponentShouldHaveTestBuilder<TInvocationResult>
    • IViewComponentShouldReturnTestBuilder<TInvocationResult>
  • Models
    • IModelDetailsTestBuilder<TModel>
    • IModelErrorDetailsTestBuilder
    • IModelErrorDetailsTestBuilder<TModel>
    • IModelErrorTestBuilder
    • IModelErrorTestBuilder<TModel>
    • IModelStateTestBuilder
  • Options
    • IOptionsBuilder
  • Routing
    • IResolvedRouteTestBuilder
    • IRouteTestBuilder
    • IShouldMapTestBuilder
  • Services
    • IServicesBuilder
  • Uri
    • IUriBuilder
    • IUriTestBuilder
  • ViewComponentResults
    • IViewTestBuilder
  • ViewComponents
    • IViewComponentBuilder<TViewComponent>
    • IViewComponentTestBuilder

Interface IViewComponentShouldReturnTestBuilder<TInvocationResult>

Used for testing returned view component result.

Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Invocations
Assembly:MyTested.AspNetCore.Mvc.ViewComponents.dll
Syntax
public interface IViewComponentShouldReturnTestBuilder<TInvocationResult> : IBaseShouldReturnTestBuilder<TInvocationResult, IAndTestBuilder>, IBaseShouldReturnTestBuilder<TInvocationResult>, IBaseShouldReturnTestBuilder
Type Parameters
Name Description
TInvocationResult Result from invoked view component in ASP.NET Core MVC.

Methods

| Improve this Doc View Source

Content()

Tests whether the view component result is Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult.

Declaration
IAndTestBuilder Content()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

Content(Action<String>)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult passes the given assertions.

Declaration
IAndTestBuilder Content(Action<string> assertions)
Parameters
Type Name Description
System.Action<System.String> assertions

Action containing all assertions on the content.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

Content(Func<String, Boolean>)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult passes the given predicate.

Declaration
IAndTestBuilder Content(Func<string, bool> predicate)
Parameters
Type Name Description
System.Func<System.String, System.Boolean> predicate

Predicate testing the content.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

Content(String)

Tests whether the view component result is Microsoft.AspNetCore.Mvc.ViewComponents.ContentViewComponentResult with expected content.

Declaration
IAndTestBuilder Content(string content)
Parameters
Type Name Description
System.String content

Expected content as string.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

HtmlContent()

Tests whether the view component result is Microsoft.AspNetCore.Html.IHtmlContent.

Declaration
IAndTestBuilder HtmlContent()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

HtmlContent(Action<String>)

Tests whether Microsoft.AspNetCore.Html.IHtmlContent passes the given assertions.

Declaration
IAndTestBuilder HtmlContent(Action<string> assertions)
Parameters
Type Name Description
System.Action<System.String> assertions

Action containing all assertions on the HTML content.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

HtmlContent(Func<String, Boolean>)

Tests whether Microsoft.AspNetCore.Html.IHtmlContent passes the given predicate.

Declaration
IAndTestBuilder HtmlContent(Func<string, bool> predicate)
Parameters
Type Name Description
System.Func<System.String, System.Boolean> predicate

Predicate testing the HTML content.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

HtmlContent(String)

Tests whether the view component result is Microsoft.AspNetCore.Html.IHtmlContent with expected content.

Declaration
IAndTestBuilder HtmlContent(string htmlContent)
Parameters
Type Name Description
System.String htmlContent

Expected HTML content as string.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.And.IAndTestBuilder type.

| Improve this Doc View Source

View()

Tests whether the view component result is Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult with the default view name.

Declaration
IAndViewTestBuilder View()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder type.

| Improve this Doc View Source

View(String)

Tests whether the view component result is Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult with the provided view name.

Declaration
IAndViewTestBuilder View(string viewName)
Parameters
Type Name Description
System.String viewName

Expected view name.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder

Test builder of MyTested.AspNetCore.Mvc.Builders.Contracts.ViewComponentResults.IAndViewTestBuilder type.

Extension Methods

ViewComponentShouldReturnTestBuilderExtensions.View<TInvocationResult, TModel>(TModel)
ViewComponentShouldReturnTestBuilderExtensions.View<TInvocationResult, TModel>(String, TModel)
BaseShouldReturnTestBuilderExtensions.ResultOfType<TInvocationResult>(Type)
BaseShouldReturnTestBuilderExtensions.ResultOfType<TResult>()
BaseShouldReturnTestBuilderExtensions.Result<TResult>(TResult)
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • Content()
    • Content(Action<String>)
    • Content(Func<String, Boolean>)
    • Content(String)
    • HtmlContent()
    • HtmlContent(Action<String>)
    • HtmlContent(Func<String, Boolean>)
    • HtmlContent(String)
    • View()
    • View(String)
  • Extension Methods
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX