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

Used for testing action attributes.

Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface IActionAttributesTestBuilder : IControllerActionAttributesTestBuilder<IAndActionAttributesTestBuilder>, IBaseAttributesTestBuilder<IAndActionAttributesTestBuilder>

Methods

| Improve this Doc View Source

ChangingActionNameTo(String)

Tests whether the action attributes contain Microsoft.AspNetCore.Mvc.ActionNameAttribute.

Declaration
IAndActionAttributesTestBuilder ChangingActionNameTo(string actionName)
Parameters
Type Name Description
System.String actionName

Expected overridden name of the action.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

DisablingActionCall()

Tests whether the action attributes contain Microsoft.AspNetCore.Mvc.NonActionAttribute.

Declaration
IAndActionAttributesTestBuilder DisablingActionCall()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

RestrictingForHttpMethod(HttpMethod)

Tests whether the action attributes restrict the request to a specific HTTP method (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethod(HttpMethod httpMethod)
Parameters
Type Name Description
System.Net.Http.HttpMethod httpMethod

HTTP method provided as HttpMethod class.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

RestrictingForHttpMethod(String)

Tests whether the action attributes restrict the request to a specific HTTP method (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethod(string httpMethod)
Parameters
Type Name Description
System.String httpMethod

HTTP method provided as string.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

RestrictingForHttpMethod<THttpMethod>()

Tests whether the action attributes restrict the request to a specific HTTP method (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethod<THttpMethod>()where THttpMethod : Attribute, IActionHttpMethodProvider, new ()
Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

Type Parameters
Name Description
THttpMethod Attribute of type Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider.
| Improve this Doc View Source

RestrictingForHttpMethods(IEnumerable<HttpMethod>)

Tests whether the action attributes restrict the request to a specific HTTP methods (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethods(IEnumerable<HttpMethod> httpMethods)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Net.Http.HttpMethod> httpMethods

HTTP methods provided as collection of HttpMethod classes.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

RestrictingForHttpMethods(IEnumerable<String>)

Tests whether the action attributes restrict the request to a specific HTTP methods (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethods(IEnumerable<string> httpMethods)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> httpMethods

HTTP methods provided as collection of strings.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

RestrictingForHttpMethods(HttpMethod[])

Tests whether the action attributes restrict the request to a specific HTTP methods (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethods(params HttpMethod[] httpMethods)
Parameters
Type Name Description
System.Net.Http.HttpMethod[] httpMethods

HTTP methods provided as parameters of HttpMethod class.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

| Improve this Doc View Source

RestrictingForHttpMethods(String[])

Tests whether the action attributes restrict the request to a specific HTTP methods (Microsoft.AspNetCore.Mvc.AcceptVerbsAttribute or the specific Microsoft.AspNetCore.Mvc.HttpGetAttribute, Microsoft.AspNetCore.Mvc.HttpPostAttribute, etc.).

Declaration
IAndActionAttributesTestBuilder RestrictingForHttpMethods(params string[] httpMethods)
Parameters
Type Name Description
System.String[] httpMethods

HTTP methods provided as string parameters.

Returns
Type Description
MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder

The same MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes.IAndActionAttributesTestBuilder.

Extension Methods

ActionAttributesTestBuilderViewFeaturesExtensions.ValidatingAntiForgeryToken()
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • ChangingActionNameTo(String)
    • DisablingActionCall()
    • RestrictingForHttpMethod(HttpMethod)
    • RestrictingForHttpMethod(String)
    • RestrictingForHttpMethod<THttpMethod>()
    • RestrictingForHttpMethods(IEnumerable<HttpMethod>)
    • RestrictingForHttpMethods(IEnumerable<String>)
    • RestrictingForHttpMethods(HttpMethod[])
    • RestrictingForHttpMethods(String[])
  • Extension Methods
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX