MY TESTED ASP.NET CORE MVC DOCS
  • Tutorial
  • Testing Guide
  • API Reference
  • Troubleshoot
  • About
  • API Reference
  • MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View
  • IViewComponentTestBuilder
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 IViewComponentTestBuilder

Used for testing Microsoft.AspNetCore.Mvc.ViewComponentResult.

Inherited Members
IBaseTestBuilderWithComponent.ShouldPassForThe<TComponent>(Action<TComponent>)
IBaseTestBuilderWithComponent.ShouldPassForThe<TComponent>(Func<TComponent, Boolean>)
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View
Assembly:MyTested.AspNetCore.Mvc.ViewActionResults.dll
Syntax
public interface IViewComponentTestBuilder : IBaseTestBuilderWithResponseModel, IBaseTestBuilderWithComponent, IBaseTestBuilder

Methods

| Improve this Doc View Source

ContainingArgument(String, Object)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with an argument deeply equal to the provided one.

Declaration
IAndViewComponentTestBuilder ContainingArgument(string name, object value)
Parameters
Type Name Description
System.String name

Name of the argument.

System.Object value

Expected argument value.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

ContainingArgument<TArgument>(TArgument)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with an argument equal to the provided one.

Declaration
IAndViewComponentTestBuilder ContainingArgument<TArgument>(TArgument argument)
Parameters
Type Name Description
TArgument argument

Argument object.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

Type Parameters
Name Description
TArgument Type of the argument.
| Improve this Doc View Source

ContainingArgumentOfType<TArgument>()

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with an argument of the provided type.

Declaration
IAndViewComponentTestBuilder ContainingArgumentOfType<TArgument>()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

Type Parameters
Name Description
TArgument Type of the argument.
| Improve this Doc View Source

ContainingArgumentOfType<TArgument>(String)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with an argument of the provided type and the given name.

Declaration
IAndViewComponentTestBuilder ContainingArgumentOfType<TArgument>(string name)
Parameters
Type Name Description
System.String name

Name of the argument.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

Type Parameters
Name Description
TArgument Type of the argument.
| Improve this Doc View Source

ContainingArguments(IDictionary<String, Object>)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with the provided arguments.

Declaration
IAndViewComponentTestBuilder ContainingArguments(IDictionary<string, object> arguments)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.String, System.Object> arguments

Argument objects as dictionary.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

ContainingArguments(Object)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with the provided arguments.

Declaration
IAndViewComponentTestBuilder ContainingArguments(object arguments)
Parameters
Type Name Description
System.Object arguments

Arguments object.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

ContainingArgumentWithName(String)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult will be invoked with an argument with the same name as the provided one.

Declaration
IAndViewComponentTestBuilder ContainingArgumentWithName(string name)
Parameters
Type Name Description
System.String name

Name of the argument.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

WithContentType(MediaTypeHeaderValue)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult has the same content type as the provided MediaTypeHeaderValue.

Declaration
IAndViewComponentTestBuilder WithContentType(MediaTypeHeaderValue contentType)
Parameters
Type Name Description
Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType

Content type as MediaTypeHeaderValue.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

WithContentType(String)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult has the same content type as the provided string.

Declaration
IAndViewComponentTestBuilder WithContentType(string contentType)
Parameters
Type Name Description
System.String contentType

Content type as string.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

WithStatusCode(Int32)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult has the same status code as the provided one.

Declaration
IAndViewComponentTestBuilder WithStatusCode(int statusCode)
Parameters
Type Name Description
System.Int32 statusCode

Status code as integer.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

WithStatusCode(HttpStatusCode)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult has the same status code as the provided HttpStatusCode.

Declaration
IAndViewComponentTestBuilder WithStatusCode(HttpStatusCode statusCode)
Parameters
Type Name Description
System.Net.HttpStatusCode statusCode

HttpStatusCode enumeration.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

WithViewEngine(IViewEngine)

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult has the same IViewEngine as the provided one.

Declaration
IAndViewComponentTestBuilder WithViewEngine(IViewEngine viewEngine)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine viewEngine

View engine of type IViewEngine.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

| Improve this Doc View Source

WithViewEngineOfType<TViewEngine>()

Tests whether Microsoft.AspNetCore.Mvc.ViewComponentResult has the same IViewEngine type as the provided one.

Declaration
IAndViewComponentTestBuilder WithViewEngineOfType<TViewEngine>()where TViewEngine : IViewEngine
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.View.IAndViewComponentTestBuilder.

Type Parameters
Name Description
TViewEngine View engine of type IViewEngine.

Extension Methods

BaseTestBuilderWithResponseModelExtensions.WithNoModel()
BaseTestBuilderWithResponseModelExtensions.WithModelOfType(Type)
BaseTestBuilderWithResponseModelExtensions.WithModelOfType<TModel>()
BaseTestBuilderWithResponseModelExtensions.WithModel<TModel>(TModel)
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • ContainingArgument(String, Object)
    • ContainingArgument<TArgument>(TArgument)
    • ContainingArgumentOfType<TArgument>()
    • ContainingArgumentOfType<TArgument>(String)
    • ContainingArguments(IDictionary<String, Object>)
    • ContainingArguments(Object)
    • ContainingArgumentWithName(String)
    • WithContentType(MediaTypeHeaderValue)
    • WithContentType(String)
    • WithStatusCode(Int32)
    • WithStatusCode(HttpStatusCode)
    • WithViewEngine(IViewEngine)
    • WithViewEngineOfType<TViewEngine>()
  • Extension Methods
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX