Interface IControllerActionAttributesTestBuilder<TAttributesTestBuilder>
Base interface for all controller action attribute test builders.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Attributes
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface IControllerActionAttributesTestBuilder<TAttributesTestBuilder> : IBaseAttributesTestBuilder<TAttributesTestBuilder> where TAttributesTestBuilder : IBaseAttributesTestBuilder<TAttributesTestBuilder>
Type Parameters
Name | Description |
---|---|
TAttributesTestBuilder | Type of attributes test builder to use as a return type for common methods. |
Methods
| Improve this Doc View SourceAllowingAnonymousRequests()
Checks whether the collected attributes contain Microsoft.AspNetCore.Authorization.AllowAnonymousAttribute.
Declaration
TAttributesTestBuilder AllowingAnonymousRequests()
Returns
Type | Description |
---|---|
TAttributesTestBuilder | The same attributes test builder. |
ChangingRouteTo(String, String, Nullable<Int32>)
Checks whether the collected attributes contain Microsoft.AspNetCore.Mvc.RouteAttribute.
Declaration
TAttributesTestBuilder ChangingRouteTo(string template, string withName = null, int ? withOrder = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | template | Expected overridden route template of the controller. |
System.String | withName | Optional expected route name. |
System.Nullable<System.Int32> | withOrder | Optional expected route order. |
Returns
Type | Description |
---|---|
TAttributesTestBuilder | The same attributes test builder. |
RestrictingForAuthorizedRequests(String)
Checks whether the collected attributes contain Microsoft.AspNetCore.Authorization.AuthorizeAttribute.
Declaration
TAttributesTestBuilder RestrictingForAuthorizedRequests(string withAllowedRoles = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | withAllowedRoles | Optional expected authorized roles. |
Returns
Type | Description |
---|---|
TAttributesTestBuilder | The same attributes test builder. |
SpecifyingArea(String)
Checks whether the collected attributes contain Microsoft.AspNetCore.Mvc.AreaAttribute.
Declaration
TAttributesTestBuilder SpecifyingArea(string areaName)
Parameters
Type | Name | Description |
---|---|---|
System.String | areaName | Expected area name. |
Returns
Type | Description |
---|---|
TAttributesTestBuilder | The same attributes test builder. |