66 using Internal . Application ;
77 using Internal . TestContexts ;
88
9+ /// <summary>
10+ /// Provides methods to specify an ASP.NET Core MVC controller test case.
11+ /// </summary>
12+ /// <typeparam name="TController">Type of ASP.NET Core MVC controller to test.</typeparam>
913 public class MyController < TController > : ControllerBuilder < TController >
1014 where TController : class
1115 {
@@ -14,31 +18,56 @@ static MyController()
1418 TestApplication . TryInitialize ( ) ;
1519 }
1620
21+ /// <summary>
22+ /// Initializes a new instance of the <see cref="MyController{TController}"/> class.
23+ /// </summary>
1724 public MyController ( )
1825 : this ( ( TController ) null )
1926 {
2027 }
2128
29+ /// <summary>
30+ /// Initializes a new instance of the <see cref="MyController{TController}"/> class.
31+ /// </summary>
32+ /// <param name="controller">Instance of the ASP.NET Core MVC controller to test.</param>
2233 public MyController ( TController controller )
2334 : this ( ( ) => controller )
2435 {
2536 }
2637
38+ /// <summary>
39+ /// Initializes a new instance of the <see cref="MyController{TController}"/> class.
40+ /// </summary>
41+ /// <param name="construction">Construction function returning the instantiated controller.</param>
2742 public MyController ( Func < TController > construction )
2843 : base ( new ControllerTestContext { ComponentConstructionDelegate = construction } )
2944 {
3045 }
3146
47+ /// <summary>
48+ /// Starts a controller test.
49+ /// </summary>
50+ /// <returns>Test builder of <see cref="IControllerBuilder{TController}"/> type.</returns>
3251 public static IControllerBuilder < TController > Instance ( )
3352 {
3453 return Instance ( ( TController ) null ) ;
3554 }
3655
56+ /// <summary>
57+ /// Starts a controller test.
58+ /// </summary>
59+ /// <param name="controller">Instance of the ASP.NET Core MVC controller to test.</param>
60+ /// <returns>Test builder of <see cref="IControllerBuilder{TController}"/> type.</returns>
3761 public static IControllerBuilder < TController > Instance ( TController controller )
3862 {
3963 return Instance ( ( ) => controller ) ;
4064 }
4165
66+ /// <summary>
67+ /// Starts a controller test.
68+ /// </summary>
69+ /// <param name="construction">Construction function returning the instantiated controller.</param>
70+ /// <returns>Test builder of <see cref="IControllerBuilder{TController}"/> type.</returns>
4271 public static IControllerBuilder < TController > Instance ( Func < TController > construction )
4372 {
4473 return new MyController < TController > ( construction ) ;
0 commit comments