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 SourceChangingActionNameTo(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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |