Interface IApplicationConfigurationBuilder
Configures the tested application.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Application
Assembly:MyTested.AspNetCore.Mvc.Abstractions.dll
Syntax
public interface IApplicationConfigurationBuilder
Methods
| Improve this Doc View SourceWithConfiguration(Action<IApplicationBuilder>)
Adds additional middleware to the tested application builder.
Declaration
IApplicationConfigurationBuilder WithConfiguration(Action<IApplicationBuilder> app)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> | app | Action for middleware registration. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |
WithRoutes(Action<IRouteBuilder>)
Adds additional routes to the tested application builder.
Declaration
IApplicationConfigurationBuilder WithRoutes(Action<IRouteBuilder> routes)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Microsoft.AspNetCore.Routing.IRouteBuilder> | routes | Action for route registration. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |
WithServices(Action<IServiceCollection>)
Adds additional services to the tested application's services collection.
Declaration
IApplicationConfigurationBuilder WithServices(Action<IServiceCollection> services)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> | services | Action for service registration. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |
WithTestAssembly(Object)
Sets the test assembly for the tested application.
Declaration
IApplicationConfigurationBuilder WithTestAssembly(object objectFromTestAssembly)
Parameters
Type | Name | Description |
---|---|---|
System.Object | objectFromTestAssembly | Instance object from the test assembly. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |
WithTestAssembly(Assembly)
Sets the test assembly for the tested application.
Declaration
IApplicationConfigurationBuilder WithTestAssembly(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to set as test assembly. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |
WithTestAssembly(Type)
Sets the test assembly for the tested application.
Declaration
IApplicationConfigurationBuilder WithTestAssembly(Type typeFromTestAssembly)
Parameters
Type | Name | Description |
---|---|---|
System.Type | typeFromTestAssembly | Type from the test assembly. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |
WithTestConfiguration(Action<IConfigurationBuilder>)
Adds additional configuration to the tested application builder.
Declaration
IApplicationConfigurationBuilder WithTestConfiguration(Action<IConfigurationBuilder> config)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Microsoft.Extensions.Configuration.IConfigurationBuilder> | config | Action for setting the configuration. |
Returns
Type | Description |
---|---|
IApplicationConfigurationBuilder | The same IApplicationConfigurationBuilder. |