Interface ILocalRedirectTestBuilder
Used for testing Microsoft.AspNetCore.Mvc.LocalRedirectResult.
Inherited Members
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public interface ILocalRedirectTestBuilder : IBaseTestBuilderWithActionResult<LocalRedirectResult>, IBaseTestBuilderWithInvokedAction, IBaseTestBuilderWithAction, IBaseTestBuilderWithComponent, IBaseTestBuilder
Methods
| Improve this Doc View SourcePermanent()
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult is permanent.
Declaration
IAndLocalRedirectTestBuilder Permanent()
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
ToUrl(Action<IUriTestBuilder>)
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult has specific location provided by builder.
Declaration
IAndLocalRedirectTestBuilder ToUrl(Action<IUriTestBuilder> uriTestBuilder)
Parameters
Type | Name | Description |
---|---|---|
System.Action<IUriTestBuilder> | uriTestBuilder | Builder for expected URL. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
ToUrl(String)
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult has specific URL provided as string.
Declaration
IAndLocalRedirectTestBuilder ToUrl(string localUrl)
Parameters
Type | Name | Description |
---|---|---|
System.String | localUrl | Expected URL as string. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
ToUrl(Uri)
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult has specific URL provided as Uri.
Declaration
IAndLocalRedirectTestBuilder ToUrl(Uri localUrl)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | localUrl | Expected URL as Uri. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
ToUrlPassing(Action<String>)
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult URL passes the given assertions.
Declaration
IAndLocalRedirectTestBuilder ToUrlPassing(Action<string> assertions)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | assertions | Action containing all assertions on the URL. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
ToUrlPassing(Func<String, Boolean>)
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult URL passes the given predicate.
Declaration
IAndLocalRedirectTestBuilder ToUrlPassing(Func<string, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String, System.Boolean> | predicate | Predicate testing the URL. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
WithUrlHelper(IUrlHelper)
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult has the same IUrlHelper as the provided one.
Declaration
IAndLocalRedirectTestBuilder WithUrlHelper(IUrlHelper urlHelper)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.IUrlHelper | urlHelper | URL helper of type IUrlHelper. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
WithUrlHelperOfType<TUrlHelper>()
Tests whether Microsoft.AspNetCore.Mvc.LocalRedirectResult has the same IUrlHelper type as the provided one.
Declaration
IAndLocalRedirectTestBuilder WithUrlHelperOfType<TUrlHelper>()where TUrlHelper : IUrlHelper
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.LocalRedirect.IAndLocalRedirectTestBuilder. |
Type Parameters
Name | Description |
---|---|
TUrlHelper | URL helper of type IUrlHelper. |