Skip to content

Commit 0f36946

Browse files
committed
Added documentation summary to the HTTP request test builder
1 parent 0240128 commit 0f36946

28 files changed

+338
-286
lines changed

src/MyTested.Mvc/Builders/Authentication/BaseUserBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected void AddClaim(Claim claim)
146146
/// <summary>
147147
/// Adds claims to the built <see cref="ClaimsIdentity"/>.
148148
/// </summary>
149-
/// <param name="claims">Enumerable of <see cref="Claim"/> to add.</param>
149+
/// <param name="claims">Collection of <see cref="Claim"/> to add.</param>
150150
protected void AddClaims(IEnumerable<Claim> claims)
151151
{
152152
claims.ForEach(c => this.AddClaim(c));
@@ -173,7 +173,7 @@ protected void AddRole(string role)
173173
/// <summary>
174174
/// Adds roles to the built <see cref="ClaimsIdentity"/>.
175175
/// </summary>
176-
/// <param name="roles">Enumerable of roles to add.</param>
176+
/// <param name="roles">Collection of roles to add.</param>
177177
protected void AddRoles(IEnumerable<string> roles)
178178
{
179179
roles.ForEach(r => this.AddRole(r));

src/MyTested.Mvc/Builders/Base/BaseTestBuilderWithResponseModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected void ValidateContainingOfContentType(MediaTypeHeaderValue contentType)
137137
/// <summary>
138138
/// Tests whether action result contains the same content types as the provided ones.
139139
/// </summary>
140-
/// <param name="contentTypes">Expected content types as enumerable of strings.</param>
140+
/// <param name="contentTypes">Expected content types as collection of strings.</param>
141141
protected void ValidateContentTypes(IEnumerable<string> contentTypes)
142142
{
143143
this.ValidateContentTypes(contentTypes.Select(ct => new MediaTypeHeaderValue(ct)));
@@ -155,7 +155,7 @@ protected void ValidateContentTypes(params string[] contentTypes)
155155
/// <summary>
156156
/// Tests whether action result contains the same content types as the provided ones.
157157
/// </summary>
158-
/// <param name="contentTypes">Expected content types as enumerable of <see cref="MediaTypeHeaderValue"/>.</param>
158+
/// <param name="contentTypes">Expected content types as collection of <see cref="MediaTypeHeaderValue"/>.</param>
159159
protected void ValidateContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes)
160160
{
161161
ContentTypeValidator.ValidateContentTypes(
@@ -200,7 +200,7 @@ protected void ValidateContainingOutputFormatterOfType<TOutputFormatter>()
200200
/// <summary>
201201
/// Tests whether action result contains the same output formatters as the provided ones.
202202
/// </summary>
203-
/// <param name="outputFormatters">Expected enumerable of <see cref="IOutputFormatter"/>.</param>
203+
/// <param name="outputFormatters">Expected collection of <see cref="IOutputFormatter"/>.</param>
204204
protected void ValidateOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters)
205205
{
206206
OutputFormatterValidator.ValidateOutputFormatters(

src/MyTested.Mvc/Builders/Contracts/ActionResults/BadRequest/IBadRequestTestBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public interface IBadRequestTestBuilder : IBaseTestBuilderWithActionResult<Actio
9797
IAndBadRequestTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
9898

9999
/// <summary>
100-
/// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as enumerable of strings.
100+
/// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as collection of strings.
101101
/// </summary>
102-
/// <param name="contentTypes">Content types as enumerable of strings.</param>
102+
/// <param name="contentTypes">Content types as collection of strings.</param>
103103
/// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
104104
IAndBadRequestTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
105105

@@ -111,9 +111,9 @@ public interface IBadRequestTestBuilder : IBaseTestBuilderWithActionResult<Actio
111111
IAndBadRequestTestBuilder ContainingContentTypes(params string[] contentTypes);
112112

113113
/// <summary>
114-
/// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as enumerable of <see cref="MediaTypeHeaderValue"/>.
114+
/// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as collection of <see cref="MediaTypeHeaderValue"/>.
115115
/// </summary>
116-
/// <param name="contentTypes">Content types as enumerable of <see cref="MediaTypeHeaderValue"/>.</param>
116+
/// <param name="contentTypes">Content types as collection of <see cref="MediaTypeHeaderValue"/>.</param>
117117
/// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
118118
IAndBadRequestTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
119119

@@ -142,7 +142,7 @@ IAndBadRequestTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
142142
/// <summary>
143143
/// Tests whether <see cref="BadRequestObjectResult"/> contains the provided output formatters.
144144
/// </summary>
145-
/// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
145+
/// <param name="outputFormatters">Collection of <see cref="IOutputFormatter"/>.</param>
146146
/// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
147147
IAndBadRequestTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
148148

src/MyTested.Mvc/Builders/Contracts/ActionResults/Challenge/IChallengeTestBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public interface IChallengeTestBuilder : IBaseTestBuilderWithActionResult<Challe
2020
IAndChallengeTestBuilder ContainingAuthenticationScheme(string authenticationScheme);
2121

2222
/// <summary>
23-
/// Tests whether <see cref="ChallengeResult"/> has the provided enumerable of authentication schemes.
23+
/// Tests whether <see cref="ChallengeResult"/> has the provided collection of authentication schemes.
2424
/// </summary>
25-
/// <param name="authenticationSchemes">Expected authentication schemes as enumerable.</param>
25+
/// <param name="authenticationSchemes">Expected authentication schemes as collection.</param>
2626
/// <returns>The same <see cref="IAndChallengeTestBuilder"/>.</returns>
2727
IAndChallengeTestBuilder ContainingAuthenticationSchemes(IEnumerable<string> authenticationSchemes);
2828

src/MyTested.Mvc/Builders/Contracts/ActionResults/Created/ICreatedTestBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ IAndCreatedTestBuilder At<TController>(Expression<Func<TController, Task>> actio
187187
IAndCreatedTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
188188

189189
/// <summary>
190-
/// Tests whether <see cref="CreatedResult"/>, <see cref="CreatedAtActionResult"/> or <see cref="CreatedAtRouteResult"/> contains the same content types provided as enumerable of strings.
190+
/// Tests whether <see cref="CreatedResult"/>, <see cref="CreatedAtActionResult"/> or <see cref="CreatedAtRouteResult"/> contains the same content types provided as collection of strings.
191191
/// </summary>
192-
/// <param name="contentTypes">Content types as enumerable of strings.</param>
192+
/// <param name="contentTypes">Content types as collection of strings.</param>
193193
/// <returns>The same <see cref="IAndCreatedTestBuilder"/>.</returns>
194194
IAndCreatedTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
195195

@@ -201,9 +201,9 @@ IAndCreatedTestBuilder At<TController>(Expression<Func<TController, Task>> actio
201201
IAndCreatedTestBuilder ContainingContentTypes(params string[] contentTypes);
202202

203203
/// <summary>
204-
/// Tests whether <see cref="CreatedResult"/>, <see cref="CreatedAtActionResult"/> or <see cref="CreatedAtRouteResult"/> contains the same content types provided as enumerable of <see cref="MediaTypeHeaderValue"/>.
204+
/// Tests whether <see cref="CreatedResult"/>, <see cref="CreatedAtActionResult"/> or <see cref="CreatedAtRouteResult"/> contains the same content types provided as collection of <see cref="MediaTypeHeaderValue"/>.
205205
/// </summary>
206-
/// <param name="contentTypes">Content types as enumerable of <see cref="MediaTypeHeaderValue"/>.</param>
206+
/// <param name="contentTypes">Content types as collection of <see cref="MediaTypeHeaderValue"/>.</param>
207207
/// <returns>The same <see cref="IAndCreatedTestBuilder"/>.</returns>
208208
IAndCreatedTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
209209

@@ -232,7 +232,7 @@ IAndCreatedTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
232232
/// <summary>
233233
/// Tests whether <see cref="CreatedResult"/>, <see cref="CreatedAtActionResult"/> or <see cref="CreatedAtRouteResult"/> contains the provided output formatters.
234234
/// </summary>
235-
/// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
235+
/// <param name="outputFormatters">Collection of <see cref="IOutputFormatter"/>.</param>
236236
/// <returns>The same <see cref="IAndCreatedTestBuilder"/>.</returns>
237237
IAndCreatedTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
238238

src/MyTested.Mvc/Builders/Contracts/ActionResults/Forbid/IForbidTestBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public interface IForbidTestBuilder : IBaseTestBuilderWithActionResult<ForbidRes
2020
IAndForbidTestBuilder ContainingAuthenticationScheme(string authenticationScheme);
2121

2222
/// <summary>
23-
/// Tests whether <see cref="ForbidResult"/> has the provided enumerable of authentication schemes.
23+
/// Tests whether <see cref="ForbidResult"/> has the provided collection of authentication schemes.
2424
/// </summary>
25-
/// <param name="authenticationSchemes">Expected authentication schemes as enumerable.</param>
25+
/// <param name="authenticationSchemes">Expected authentication schemes as collection.</param>
2626
/// <returns>The same <see cref="IAndForbidTestBuilder"/>.</returns>
2727
IAndForbidTestBuilder ContainingAuthenticationSchemes(IEnumerable<string> authenticationSchemes);
2828

src/MyTested.Mvc/Builders/Contracts/ActionResults/Json/IJsonSerializerSettingsTestBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ IAndJsonSerializerSettingsTestBuilder ContainingConverterOfType<TJsonConverter>(
6767
/// <summary>
6868
/// Tests whether the <see cref="JsonSerializerSettings"/> contains the provided <see cref="JsonConverter"/> objects.
6969
/// </summary>
70-
/// <param name="jsonConverters">Enumerable of <see cref="JsonConverter"/>.</param>
70+
/// <param name="jsonConverters">Collection of <see cref="JsonConverter"/>.</param>
7171
/// <returns>The same <see cref="IAndJsonSerializerSettingsTestBuilder"/>.</returns>
7272
IAndJsonSerializerSettingsTestBuilder ContainingConverters(IEnumerable<JsonConverter> jsonConverters);
7373

src/MyTested.Mvc/Builders/Contracts/ActionResults/NotFound/INotFoundTestBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public interface INotFoundTestBuilder : IBaseTestBuilderWithResponseModel,
4848
IAndNotFoundTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
4949

5050
/// <summary>
51-
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as enumerable of strings.
51+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as collection of strings.
5252
/// </summary>
53-
/// <param name="contentTypes">Content types as enumerable of strings.</param>
53+
/// <param name="contentTypes">Content types as collection of strings.</param>
5454
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
5555
IAndNotFoundTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
5656

@@ -62,9 +62,9 @@ public interface INotFoundTestBuilder : IBaseTestBuilderWithResponseModel,
6262
IAndNotFoundTestBuilder ContainingContentTypes(params string[] contentTypes);
6363

6464
/// <summary>
65-
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as enumerable of <see cref="MediaTypeHeaderValue"/>.
65+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as collection of <see cref="MediaTypeHeaderValue"/>.
6666
/// </summary>
67-
/// <param name="contentTypes">Content types as enumerable of MediaTypeHeaderValue.</param>
67+
/// <param name="contentTypes">Content types as collection of MediaTypeHeaderValue.</param>
6868
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
6969
IAndNotFoundTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
7070

@@ -93,7 +93,7 @@ IAndNotFoundTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
9393
/// <summary>
9494
/// Tests whether <see cref="NotFoundObjectResult"/> contains the provided output formatters.
9595
/// </summary>
96-
/// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
96+
/// <param name="outputFormatters">Collection of <see cref="IOutputFormatter"/>.</param>
9797
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
9898
IAndNotFoundTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
9999

src/MyTested.Mvc/Builders/Contracts/ActionResults/Object/IObjectTestBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public interface IObjectTestBuilder : IBaseTestBuilderWithResponseModel,
4242
IAndObjectTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
4343

4444
/// <summary>
45-
/// Tests whether <see cref="ObjectResult"/> contains the same content types provided as enumerable of strings.
45+
/// Tests whether <see cref="ObjectResult"/> contains the same content types provided as collection of strings.
4646
/// </summary>
47-
/// <param name="contentTypes">Content types as enumerable of strings.</param>
47+
/// <param name="contentTypes">Content types as collection of strings.</param>
4848
/// <returns>The same <see cref="IAndObjectTestBuilder"/>.</returns>
4949
IAndObjectTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
5050

@@ -56,9 +56,9 @@ public interface IObjectTestBuilder : IBaseTestBuilderWithResponseModel,
5656
IAndObjectTestBuilder ContainingContentTypes(params string[] contentTypes);
5757

5858
/// <summary>
59-
/// Tests whether <see cref="ObjectResult"/> contains the same content types provided as enumerable of <see cref="MediaTypeHeaderValue"/>.
59+
/// Tests whether <see cref="ObjectResult"/> contains the same content types provided as collection of <see cref="MediaTypeHeaderValue"/>.
6060
/// </summary>
61-
/// <param name="contentTypes">Content types as enumerable of MediaTypeHeaderValue.</param>
61+
/// <param name="contentTypes">Content types as collection of MediaTypeHeaderValue.</param>
6262
/// <returns>The same <see cref="IAndObjectTestBuilder"/>.</returns>
6363
IAndObjectTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
6464

@@ -87,7 +87,7 @@ IAndObjectTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
8787
/// <summary>
8888
/// Tests whether <see cref="ObjectResult"/> contains the provided output formatters.
8989
/// </summary>
90-
/// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
90+
/// <param name="outputFormatters">Collection of <see cref="IOutputFormatter"/>.</param>
9191
/// <returns>The same <see cref="IAndObjectTestBuilder"/>.</returns>
9292
IAndObjectTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
9393

src/MyTested.Mvc/Builders/Contracts/ActionResults/Ok/IOkTestBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public interface IOkTestBuilder : IBaseTestBuilderWithResponseModel,
4848
IAndOkTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
4949

5050
/// <summary>
51-
/// Tests whether <see cref="OkObjectResult"/> contains the same content types provided as enumerable of strings.
51+
/// Tests whether <see cref="OkObjectResult"/> contains the same content types provided as collection of strings.
5252
/// </summary>
53-
/// <param name="contentTypes">Content types as enumerable of strings.</param>
53+
/// <param name="contentTypes">Content types as collection of strings.</param>
5454
/// <returns>The same <see cref="IAndOkTestBuilder"/>.</returns>
5555
IAndOkTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
5656

@@ -62,9 +62,9 @@ public interface IOkTestBuilder : IBaseTestBuilderWithResponseModel,
6262
IAndOkTestBuilder ContainingContentTypes(params string[] contentTypes);
6363

6464
/// <summary>
65-
/// Tests whether <see cref="OkObjectResult"/> contains the same content types provided as enumerable of <see cref="MediaTypeHeaderValue"/>.
65+
/// Tests whether <see cref="OkObjectResult"/> contains the same content types provided as collection of <see cref="MediaTypeHeaderValue"/>.
6666
/// </summary>
67-
/// <param name="contentTypes">Content types as enumerable of <see cref="MediaTypeHeaderValue"/>.</param>
67+
/// <param name="contentTypes">Content types as collection of <see cref="MediaTypeHeaderValue"/>.</param>
6868
/// <returns>The same <see cref="IAndOkTestBuilder"/>.</returns>
6969
IAndOkTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
7070

@@ -93,7 +93,7 @@ IAndOkTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
9393
/// <summary>
9494
/// Tests whether <see cref="OkObjectResult"/> contains the provided output formatters.
9595
/// </summary>
96-
/// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
96+
/// <param name="outputFormatters">Collection of <see cref="IOutputFormatter"/>.</param>
9797
/// <returns>The same <see cref="IAndOkTestBuilder"/>.</returns>
9898
IAndOkTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
9999

0 commit comments

Comments
 (0)