17
17
using Utilities . Validators ;
18
18
19
19
/// <summary>
20
- /// Base class for all response model test builders.
20
+ /// Base class for all test builders with response model .
21
21
/// </summary>
22
22
/// <typeparam name="TActionResult">Result from invoked action in ASP.NET Core MVC controller.</typeparam>
23
23
public abstract class BaseTestBuilderWithResponseModel < TActionResult >
@@ -29,10 +29,7 @@ public abstract class BaseTestBuilderWithResponseModel<TActionResult>
29
29
/// <summary>
30
30
/// Initializes a new instance of the <see cref="BaseTestBuilderWithResponseModel{TActionResult}" /> class.
31
31
/// </summary>
32
- /// <param name="controller">Controller on which the action will be tested.</param>
33
- /// <param name="actionName">Name of the tested action.</param>
34
- /// <param name="caughtException">Caught exception during the action execution.</param>
35
- /// <param name="actionResult">Result from the tested action.</param>
32
+ /// <param name="testContext">Controller test context containing data about the currently executed assertion chain.</param>
36
33
protected BaseTestBuilderWithResponseModel ( ControllerTestContext testContext )
37
34
: base ( testContext )
38
35
{
@@ -52,11 +49,7 @@ protected BaseTestBuilderWithResponseModel(ControllerTestContext testContext)
52
49
/// <value>String value.</value>
53
50
protected string OfTypeErrorMessageFormat { get ; set ; }
54
51
55
- /// <summary>
56
- /// Tests whether certain type of response model is returned from the invoked action.
57
- /// </summary>
58
- /// <typeparam name="TResponseModel">Type of the response model.</typeparam>
59
- /// <returns>Builder for testing the response model errors.</returns>
52
+ /// <inheritdoc />
60
53
public IModelDetailsTestBuilder < TResponseModel > WithResponseModelOfType < TResponseModel > ( )
61
54
{
62
55
var actualResponseDataType = this . GetReturnType ( ) ;
@@ -80,12 +73,7 @@ public IModelDetailsTestBuilder<TResponseModel> WithResponseModelOfType<TRespons
80
73
return new ModelDetailsTestBuilder < TResponseModel > ( this . TestContext ) ;
81
74
}
82
75
83
- /// <summary>
84
- /// Tests whether a deeply equal object to the provided one is returned from the invoked action.
85
- /// </summary>
86
- /// <typeparam name="TResponseModel">Type of the response model.</typeparam>
87
- /// <param name="expectedModel">Expected model to be returned.</param>
88
- /// <returns>Builder for testing the response model errors.</returns>
76
+ /// <inheritdoc />
89
77
public IModelDetailsTestBuilder < TResponseModel > WithResponseModel < TResponseModel > ( TResponseModel expectedModel )
90
78
{
91
79
this . WithResponseModelOfType < TResponseModel > ( ) ;
@@ -107,7 +95,7 @@ public IModelDetailsTestBuilder<TResponseModel> WithResponseModel<TResponseModel
107
95
/// <summary>
108
96
/// Tests whether action result has the same status code as the provided one.
109
97
/// </summary>
110
- /// <param name="statusCode">Status code.</param>
98
+ /// <param name="statusCode">Status code as integer .</param>
111
99
protected void ValidateStatusCode ( int statusCode )
112
100
{
113
101
this . ValidateStatusCode ( ( HttpStatusCode ) statusCode ) ;
@@ -116,7 +104,7 @@ protected void ValidateStatusCode(int statusCode)
116
104
/// <summary>
117
105
/// Tests whether action result has the same status code as the provided HttpStatusCode.
118
106
/// </summary>
119
- /// <param name="statusCode">HttpStatusCode enumeration.</param>
107
+ /// <param name="statusCode"><see cref=" HttpStatusCode"/> enumeration.</param>
120
108
protected void ValidateStatusCode ( HttpStatusCode statusCode )
121
109
{
122
110
HttpStatusCodeValidator . ValidateHttpStatusCode (
@@ -137,7 +125,7 @@ protected void ValidateContainingOfContentType(string contentType)
137
125
/// <summary>
138
126
/// Tests whether action result contains the same content type as the provided MediaTypeHeaderValue.
139
127
/// </summary>
140
- /// <param name="contentType">Expected content type as MediaTypeHeaderValue.</param>
128
+ /// <param name="contentType">Expected content type as <see cref=" MediaTypeHeaderValue"/> .</param>
141
129
protected void ValidateContainingOfContentType ( MediaTypeHeaderValue contentType )
142
130
{
143
131
ContentTypeValidator . ValidateContainingOfContentType (
@@ -167,7 +155,7 @@ protected void ValidateContentTypes(params string[] contentTypes)
167
155
/// <summary>
168
156
/// Tests whether action result contains the same content types as the provided ones.
169
157
/// </summary>
170
- /// <param name="contentTypes">Expected content types as enumerable of MediaTypeHeaderValue.</param>
158
+ /// <param name="contentTypes">Expected content types as enumerable of <see cref=" MediaTypeHeaderValue"/> .</param>
171
159
protected void ValidateContentTypes ( IEnumerable < MediaTypeHeaderValue > contentTypes )
172
160
{
173
161
ContentTypeValidator . ValidateContentTypes (
@@ -179,7 +167,7 @@ protected void ValidateContentTypes(IEnumerable<MediaTypeHeaderValue> contentTyp
179
167
/// <summary>
180
168
/// Tests whether action result contains the same content types as the provided ones.
181
169
/// </summary>
182
- /// <param name="contentTypes">Expected content types as MediaTypeHeaderValue parameters.</param>
170
+ /// <param name="contentTypes">Expected content types as <see cref=" MediaTypeHeaderValue"/> parameters.</param>
183
171
protected void ValidateContentTypes ( params MediaTypeHeaderValue [ ] contentTypes )
184
172
{
185
173
this . ValidateContentTypes ( contentTypes . AsEnumerable ( ) ) ;
@@ -188,7 +176,7 @@ protected void ValidateContentTypes(params MediaTypeHeaderValue[] contentTypes)
188
176
/// <summary>
189
177
/// Tests whether action result contains the same output formatter as the provided one.
190
178
/// </summary>
191
- /// <param name="outputFormatter">Expected instance of IOutputFormatter.</param>
179
+ /// <param name="outputFormatter">Expected instance of <see cref=" IOutputFormatter"/> .</param>
192
180
protected void ValidateContainingOfOutputFormatter ( IOutputFormatter outputFormatter )
193
181
{
194
182
OutputFormatterValidator . ValidateContainingOfOutputFormatter (
@@ -200,7 +188,7 @@ protected void ValidateContainingOfOutputFormatter(IOutputFormatter outputFormat
200
188
/// <summary>
201
189
/// Tests whether action result contains type of output formatter as the provided one.
202
190
/// </summary>
203
- /// <typeparam name="TOutputFormatter">Expected type of IOutputFormatter.</typeparam>
191
+ /// <typeparam name="TOutputFormatter">Expected type of <see cref=" IOutputFormatter"/> .</typeparam>
204
192
protected void ValidateContainingOutputFormatterOfType < TOutputFormatter > ( )
205
193
where TOutputFormatter : IOutputFormatter
206
194
{
@@ -212,7 +200,7 @@ protected void ValidateContainingOutputFormatterOfType<TOutputFormatter>()
212
200
/// <summary>
213
201
/// Tests whether action result contains the same output formatters as the provided ones.
214
202
/// </summary>
215
- /// <param name="outputFormatters">Expected enumerable of IOutputFormatter.</param>
203
+ /// <param name="outputFormatters">Expected enumerable of <see cref=" IOutputFormatter"/> .</param>
216
204
protected void ValidateOutputFormatters ( IEnumerable < IOutputFormatter > outputFormatters )
217
205
{
218
206
OutputFormatterValidator . ValidateOutputFormatters (
@@ -224,7 +212,7 @@ protected void ValidateOutputFormatters(IEnumerable<IOutputFormatter> outputForm
224
212
/// <summary>
225
213
/// Tests whether action result contains the same output formatters as the provided ones.
226
214
/// </summary>
227
- /// <param name="outputFormatters">Expected IOutputFormatter parameters.</param>
215
+ /// <param name="outputFormatters">Expected <see cref=" IOutputFormatter"/> parameters.</param>
228
216
protected void ValidateOutputFormatters ( params IOutputFormatter [ ] outputFormatters )
229
217
=> this . ValidateOutputFormatters ( outputFormatters . AsEnumerable ( ) ) ;
230
218
0 commit comments