Interface IForbidTestBuilder
Used for testing Microsoft.AspNetCore.Mvc.ForbidResult.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface IForbidTestBuilder : IBaseTestBuilderWithActionResult<ForbidResult>, IBaseTestBuilderWithInvokedAction, IBaseTestBuilderWithAction, IBaseTestBuilderWithComponent, IBaseTestBuilder
Methods
| Improve this Doc View SourceContainingAuthenticationScheme(String)
Tests whether Microsoft.AspNetCore.Mvc.ForbidResult contains specific authentication scheme provided by string.
Declaration
IAndForbidTestBuilder ContainingAuthenticationScheme(string authenticationScheme)
Parameters
Type | Name | Description |
---|---|---|
System.String | authenticationScheme | Expected authentication scheme as string. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder. |
ContainingAuthenticationSchemes(IEnumerable<String>)
Tests whether Microsoft.AspNetCore.Mvc.ForbidResult has the provided collection of authentication schemes.
Declaration
IAndForbidTestBuilder ContainingAuthenticationSchemes(IEnumerable<string> authenticationSchemes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | authenticationSchemes | Expected authentication schemes as collection. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder. |
ContainingAuthenticationSchemes(String[])
Tests whether Microsoft.AspNetCore.Mvc.ForbidResult has the provided parameters of authentication schemes.
Declaration
IAndForbidTestBuilder ContainingAuthenticationSchemes(params string[] authenticationSchemes)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | authenticationSchemes | Expected authentication schemes as string parameters. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder. |
WithAuthenticationProperties(AuthenticationProperties)
Tests whether Microsoft.AspNetCore.Mvc.ForbidResult has the provided AuthenticationProperties.
Declaration
IAndForbidTestBuilder WithAuthenticationProperties(AuthenticationProperties properties)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties | properties | Expected AuthenticationProperties. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder. |
WithAuthenticationProperties(Action<IAuthenticationPropertiesTestBuilder>)
Tests whether Microsoft.AspNetCore.Mvc.ForbidResult has the given AuthenticationProperties provided as builder.
Declaration
IAndForbidTestBuilder WithAuthenticationProperties(Action<IAuthenticationPropertiesTestBuilder> authenticationPropertiesBuilder)
Parameters
Type | Name | Description |
---|---|---|
System.Action<IAuthenticationPropertiesTestBuilder> | authenticationPropertiesBuilder | Expected AuthenticationProperties builder. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Forbid.IAndForbidTestBuilder. |