File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
src/MyTested.AspNetCore.Mvc.Options Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 2
2
{
3
3
using System ;
4
4
5
+ /// <summary>
6
+ /// Used for building configuration options.
7
+ /// </summary>
5
8
public interface IOptionsBuilder
6
9
{
10
+ /// <summary>
11
+ /// Sets initial values to the provided configuration options.
12
+ /// </summary>
13
+ /// <typeparam name="TOptions">Type of configuration options to set up.</typeparam>
14
+ /// <param name="optionsSetup">Action setting the configuration options.</param>
7
15
void For < TOptions > ( Action < TOptions > optionsSetup ) where TOptions : class , new ( ) ;
8
16
}
9
17
}
Original file line number Diff line number Diff line change 6
6
using Internal . TestContexts ;
7
7
using Utilities . Validators ;
8
8
9
+ /// <summary>
10
+ /// Used for building configuration options.
11
+ /// </summary>
9
12
public class OptionsBuilder : BaseTestBuilder , IOptionsBuilder
10
13
{
14
+ /// <summary>
15
+ /// Initializes a new instance of the <see cref="OptionsBuilder"/> class.
16
+ /// </summary>
17
+ /// <param name="testContext"><see cref="HttpTestContext"/> containing data about the currently executed assertion chain.</param>
11
18
public OptionsBuilder ( HttpTestContext testContext )
12
19
: base ( testContext )
13
20
{
14
21
}
15
22
23
+ /// <inheritdoc />
16
24
public void For < TOptions > ( Action < TOptions > optionsSetup )
17
25
where TOptions : class , new ( )
18
26
{
Original file line number Diff line number Diff line change 5
5
using Builders . Contracts ;
6
6
using Builders . Controllers ;
7
7
8
+ /// <summary>
9
+ /// Contains configuration options extension methods for <see cref="IControllerBuilder{TController}"/>.
10
+ /// </summary>
8
11
public static class ControllerBuilderOptionsExtensions
9
12
{
13
+ /// <summary>
14
+ /// Sets initial values to the configuration options on the tested controller.
15
+ /// </summary>
16
+ /// <typeparam name="TController">Class representing ASP.NET Core MVC controller.</typeparam>
17
+ /// <param name="controllerBuilder">Instance of <see cref="IControllerBuilder{TController}"/> type.</param>
18
+ /// <param name="optionsBuilder">Action setting the configuration options by using <see cref="IOptionsBuilder"/>.</param>
19
+ /// <returns>The same <see cref="IControllerBuilder{TController}"/>.</returns>
10
20
public static IControllerBuilder < TController > WithOptions < TController > (
11
21
this IControllerBuilder < TController > controllerBuilder ,
12
22
Action < IOptionsBuilder > optionsBuilder )
You can’t perform that action at this time.
0 commit comments