Skip to content

Commit 07294e3

Browse files
committed
Added documentation summary for all action result test builders
1 parent 678862d commit 07294e3

18 files changed

+291
-241
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ public interface IBadRequestTestBuilder : IBaseTestBuilderWithActionResult<Actio
6969
IModelErrorTestBuilder<TRequestModel> WithModelStateErrorFor<TRequestModel>();
7070

7171
/// <summary>
72-
/// Tests whether <see cref="BadRequestResult"/> or <see cref="BadRequestObjectResult"/> has the same status code as the provided one.
72+
/// Tests whether <see cref="BadRequestObjectResult"/> has the same status code as the provided one.
7373
/// </summary>
7474
/// <param name="statusCode">Status code as integer.</param>
7575
/// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
7676
IAndBadRequestTestBuilder WithStatusCode(int statusCode);
7777

7878
/// <summary>
79-
/// Tests whether <see cref="BadRequestResult"/> or <see cref="BadRequestObjectResult"/> has the same status code as the provided <see cref="HttpStatusCode"/>.
79+
/// Tests whether <see cref="BadRequestObjectResult"/> has the same status code as the provided <see cref="HttpStatusCode"/>.
8080
/// </summary>
8181
/// <param name="statusCode"><see cref="HttpStatusCode"/> enumeration.</param>
8282
/// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ IAndCreatedTestBuilder At<TController>(Expression<Action<TController>> actionCal
153153
/// Tests whether <see cref="CreatedAtActionResult"/> or <see cref="CreatedAtRouteResult"/> returns created at specific asynchronous action.
154154
/// </summary>
155155
/// <typeparam name="TController">Type of expected controller.</typeparam>
156-
/// <param name="actionCall">Method call expression indicating the expected asynchronous action.</param>
156+
/// <param name="actionCall">Method call expression indicating the expected asynchronous created action.</param>
157157
/// <returns>The same <see cref="IAndCreatedTestBuilder"/>.</returns>
158158
IAndCreatedTestBuilder At<TController>(Expression<Func<TController, Task>> actionCall)
159159
where TController : class;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
namespace MyTested.Mvc.Builders.Contracts.ActionResults.LocalRedirect
22
{
33
/// <summary>
4-
/// Used for adding AndAlso() method to the the local redirect response tests.
4+
/// Used for adding AndAlso() method to the <see cref="Microsoft.AspNetCore.Mvc.LocalRedirectResult"/> tests.
55
/// </summary>
66
public interface IAndLocalRedirectTestBuilder : ILocalRedirectTestBuilder
77
{
88
/// <summary>
9-
/// AndAlso method for better readability when chaining local redirect result tests.
9+
/// AndAlso method for better readability when chaining <see cref="Microsoft.AspNetCore.Mvc.LocalRedirectResult"/> tests.
1010
/// </summary>
11-
/// <returns>Local redirect result test builder.</returns>
11+
/// <returns>The same <see cref="ILocalRedirectTestBuilder"/>.</returns>
1212
ILocalRedirectTestBuilder AndAlso();
1313
}
1414
}

src/MyTested.Mvc/Builders/Contracts/ActionResults/LocalRedirect/ILocalRedirectTestBuilder.cs

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,75 +8,81 @@
88
using Uris;
99

1010
/// <summary>
11-
/// Used for testing local redirect result.
11+
/// Used for testing <see cref="LocalRedirectResult"/>.
1212
/// </summary>
1313
public interface ILocalRedirectTestBuilder : IBaseTestBuilderWithActionResult<LocalRedirectResult>
1414
{
1515
/// <summary>
16-
/// Tests whether local redirect result is permanent.
16+
/// Tests whether <see cref="LocalRedirectResult"/> is permanent.
1717
/// </summary>
18-
/// <returns>The same local redirect test builder.</returns>
18+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
1919
IAndLocalRedirectTestBuilder Permanent();
2020

2121
/// <summary>
22-
/// Tests whether local redirect result has specific URL provided as string.
22+
/// Tests whether <see cref="LocalRedirectResult"/> has specific URL provided as string.
2323
/// </summary>
2424
/// <param name="localUrl">Expected URL as string.</param>
25-
/// <returns>The same local redirect test builder.</returns>
25+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
2626
IAndLocalRedirectTestBuilder ToUrl(string localUrl);
2727

2828
/// <summary>
29-
/// Tests whether local redirect result URL passes given assertions.
29+
/// Tests whether <see cref="LocalRedirectResult"/> URL passes given assertions.
3030
/// </summary>
3131
/// <param name="assertions">Action containing all assertions on the URL.</param>
32-
/// <returns>The same local redirect test builder.</returns>
32+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
3333
IAndLocalRedirectTestBuilder ToUrlPassing(Action<string> assertions);
3434

3535
/// <summary>
36-
/// Tests whether local redirect result URL passes given predicate.
36+
/// Tests whether <see cref="LocalRedirectResult"/> URL passes given predicate.
3737
/// </summary>
3838
/// <param name="predicate">Predicate testing the URL.</param>
39-
/// <returns>The same local redirect test builder.</returns>
39+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
4040
IAndLocalRedirectTestBuilder ToUrlPassing(Func<string, bool> predicate);
4141

4242
/// <summary>
43-
/// Tests whether local redirect result has specific URL provided as URI.
43+
/// Tests whether <see cref="LocalRedirectResult"/> has specific URL provided as <see cref="Uri"/>.
4444
/// </summary>
45-
/// <param name="localUrl">Expected URL as URI.</param>
46-
/// <returns>The same local redirect test builder.</returns>
45+
/// <param name="localUrl">Expected URL as <see cref="Uri"/>.</param>
46+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
4747
IAndLocalRedirectTestBuilder ToUrl(Uri localUrl);
4848

4949
/// <summary>
50-
/// Tests whether local redirect result has specific location provided by builder.
50+
/// Tests whether <see cref="LocalRedirectResult"/> has specific location provided by builder.
5151
/// </summary>
52-
/// <param name="uriTestBuilder">Builder for expected URI.</param>
53-
/// <returns>The same local redirect test builder.</returns>
52+
/// <param name="uriTestBuilder">Builder for expected URL.</param>
53+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
5454
IAndLocalRedirectTestBuilder ToUrl(Action<IUriTestBuilder> uriTestBuilder);
5555

5656
/// <summary>
57-
/// Tests whether local redirect result has the same URL helper as the provided one.
57+
/// Tests whether <see cref="LocalRedirectResult"/> has the same <see cref="IUrlHelper"/> as the provided one.
5858
/// </summary>
59-
/// <param name="urlHelper">URL helper of type IUrlHelper.</param>
60-
/// <returns>The same local redirect test builder.</returns>
59+
/// <param name="urlHelper">URL helper of type <see cref="IUrlHelper"/>.</param>
60+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
6161
IAndLocalRedirectTestBuilder WithUrlHelper(IUrlHelper urlHelper);
6262

6363
/// <summary>
64-
/// Tests whether local redirect result has the same URL helper type as the provided one.
64+
/// Tests whether <see cref="LocalRedirectResult"/> has the same <see cref="IUrlHelper"/> type as the provided one.
6565
/// </summary>
66-
/// <typeparam name="TUrlHelper">URL helper of type IUrlHelper.</typeparam>
67-
/// <returns>The same local redirect test builder.</returns>
66+
/// <typeparam name="TUrlHelper">URL helper of type <see cref="IUrlHelper"/>.</typeparam>
67+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
6868
IAndLocalRedirectTestBuilder WithUrlHelperOfType<TUrlHelper>()
6969
where TUrlHelper : IUrlHelper;
7070

7171
/// <summary>
72-
/// Tests whether local redirect result redirects to specific action.
72+
/// Tests whether <see cref="LocalRedirectResult"/> redirects to specific action.
7373
/// </summary>
7474
/// <typeparam name="TController">Type of expected redirect controller.</typeparam>
7575
/// <param name="actionCall">Method call expression indicating the expected redirect action.</param>
76-
/// <returns>The same local redirect test builder.</returns>
76+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
7777
IAndLocalRedirectTestBuilder To<TController>(Expression<Action<TController>> actionCall)
7878
where TController : class;
7979

80+
/// <summary>
81+
/// Tests whether <see cref="LocalRedirectResult"/> redirects to specific asynchronous action.
82+
/// </summary>
83+
/// <typeparam name="TController">Type of expected redirect controller.</typeparam>
84+
/// <param name="actionCall">Method call expression indicating the expected asynchronous action.</param>
85+
/// <returns>The same <see cref="IAndLocalRedirectTestBuilder"/>.</returns>
8086
IAndLocalRedirectTestBuilder To<TController>(Expression<Func<TController, Task>> actionCall)
8187
where TController : class;
8288
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
namespace MyTested.Mvc.Builders.Contracts.ActionResults.NotFound
22
{
33
/// <summary>
4-
/// Used for adding AndAlso() method to the HTTP not found response tests.
4+
/// Used for adding AndAlso() method to the <see cref="Microsoft.AspNetCore.Mvc.NotFoundResult"/> or <see cref="Microsoft.AspNetCore.Mvc.NotFoundObjectResult"/> tests.
55
/// </summary>
66
public interface IAndNotFoundTestBuilder : INotFoundTestBuilder
77
{
88
/// <summary>
9-
/// AndAlso method for better readability when chaining HTTP not found result tests.
9+
/// AndAlso method for better readability when chaining <see cref="Microsoft.AspNetCore.Mvc.NotFoundResult"/> or <see cref="Microsoft.AspNetCore.Mvc.NotFoundObjectResult"/> tests.
1010
/// </summary>
11-
/// <returns>HTTP not found result test builder.</returns>
11+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
1212
IAndNotFoundTestBuilder AndAlso();
1313
}
1414
}

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,100 +8,100 @@
88
using Microsoft.Net.Http.Headers;
99

1010
/// <summary>
11-
/// Used for testing HTTP not found result.
11+
/// Used for testing <see cref="NotFoundResult"/> or <see cref="NotFoundObjectResult"/>.
1212
/// </summary>
1313
public interface INotFoundTestBuilder : IBaseTestBuilderWithResponseModel,
1414
IBaseTestBuilderWithActionResult<ActionResult>
1515
{
1616
/// <summary>
1717
/// Tests whether no response model is returned from the invoked action.
1818
/// </summary>
19-
/// <returns>Base test builder with action.</returns>
19+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
2020
IAndNotFoundTestBuilder WithNoResponseModel();
2121

2222
/// <summary>
23-
/// Tests whether HTTP not found result has the same status code as the provided one.
23+
/// Tests whether <see cref="NotFoundObjectResult"/> has the same status code as the provided one.
2424
/// </summary>
25-
/// <param name="statusCode">Status code.</param>
26-
/// <returns>The same HTTP not found test builder.</returns>
25+
/// <param name="statusCode">Status code as integer.</param>
26+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
2727
IAndNotFoundTestBuilder WithStatusCode(int statusCode);
2828

2929
/// <summary>
30-
/// Tests whether HTTP not found has the same status code as the provided HttpStatusCode.
30+
/// Tests whether <see cref="NotFoundObjectResult"/> has the same status code as the provided <see cref="HttpStatusCode"/>.
3131
/// </summary>
32-
/// <param name="statusCode">HttpStatusCode enumeration.</param>
33-
/// <returns>The same HTTP not found test builder.</returns>
32+
/// <param name="statusCode"><see cref="HttpStatusCode"/> enumeration.</param>
33+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
3434
IAndNotFoundTestBuilder WithStatusCode(HttpStatusCode statusCode);
3535

3636
/// <summary>
37-
/// Tests whether HTTP not found result contains the content type provided as string.
37+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the content type provided as string.
3838
/// </summary>
3939
/// <param name="contentType">Content type as string.</param>
40-
/// <returns>The same HTTP not found test builder.</returns>
40+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
4141
IAndNotFoundTestBuilder ContainingContentType(string contentType);
4242

4343
/// <summary>
44-
/// Tests whether HTTP not found result contains the content type provided as MediaTypeHeaderValue.
44+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the content type provided as <see cref="MediaTypeHeaderValue"/>.
4545
/// </summary>
46-
/// <param name="contentType">Content type as MediaTypeHeaderValue.</param>
47-
/// <returns>The same HTTP not found test builder.</returns>
46+
/// <param name="contentType">Content type as <see cref="MediaTypeHeaderValue"/>.</param>
47+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
4848
IAndNotFoundTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
4949

5050
/// <summary>
51-
/// Tests whether HTTP not found result contains the same content types provided as enumerable of strings.
51+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as enumerable of strings.
5252
/// </summary>
5353
/// <param name="contentTypes">Content types as enumerable of strings.</param>
54-
/// <returns>The same HTTP not found test builder.</returns>
54+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
5555
IAndNotFoundTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
5656

5757
/// <summary>
58-
/// Tests whether HTTP not found result contains the same content types provided as string parameters.
58+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as string parameters.
5959
/// </summary>
6060
/// <param name="contentTypes">Content types as string parameters.</param>
61-
/// <returns>The same HTTP not found test builder.</returns>
61+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
6262
IAndNotFoundTestBuilder ContainingContentTypes(params string[] contentTypes);
6363

6464
/// <summary>
65-
/// Tests whether HTTP not found result contains the same content types provided as enumerable of MediaTypeHeaderValue.
65+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as enumerable of <see cref="MediaTypeHeaderValue"/>.
6666
/// </summary>
6767
/// <param name="contentTypes">Content types as enumerable of MediaTypeHeaderValue.</param>
68-
/// <returns>The same HTTP not found test builder.</returns>
68+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
6969
IAndNotFoundTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
7070

7171
/// <summary>
72-
/// Tests whether HTTP not found result contains the same content types provided as MediaTypeHeaderValue parameters.
72+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the same content types provided as <see cref="MediaTypeHeaderValue"/> parameters.
7373
/// </summary>
7474
/// <param name="contentTypes">Content types as MediaTypeHeaderValue parameters.</param>
75-
/// <returns>The same HTTP not found test builder.</returns>
75+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
7676
IAndNotFoundTestBuilder ContainingContentTypes(params MediaTypeHeaderValue[] contentTypes);
7777

7878
/// <summary>
79-
/// Tests whether HTTP not found result contains the provided output formatter.
79+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the provided <see cref="IOutputFormatter"/>.
8080
/// </summary>
81-
/// <param name="outputFormatter">Instance of IOutputFormatter.</param>
82-
/// <returns>The same HTTP not found test builder.</returns>
81+
/// <param name="outputFormatter">Instance of <see cref="IOutputFormatter"/>.</param>
82+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
8383
IAndNotFoundTestBuilder ContainingOutputFormatter(IOutputFormatter outputFormatter);
8484

8585
/// <summary>
86-
/// Tests whether HTTP not found result contains output formatter of the provided type.
86+
/// Tests whether <see cref="NotFoundObjectResult"/> contains <see cref="IOutputFormatter"/> of the provided type.
8787
/// </summary>
88-
/// <typeparam name="TOutputFormatter">Type of IOutputFormatter.</typeparam>
89-
/// <returns>The same HTTP not found test builder.</returns>
88+
/// <typeparam name="TOutputFormatter">Type of <see cref="IOutputFormatter"/>.</typeparam>
89+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
9090
IAndNotFoundTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
9191
where TOutputFormatter : IOutputFormatter;
9292

9393
/// <summary>
94-
/// Tests whether HTTP not found result contains the provided output formatters.
94+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the provided output formatters.
9595
/// </summary>
96-
/// <param name="outputFormatters">Enumerable of IOutputFormatter.</param>
97-
/// <returns>The same HTTP not found test builder.</returns>
96+
/// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
97+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
9898
IAndNotFoundTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
9999

100100
/// <summary>
101-
/// Tests whether HTTP not found result contains the provided output formatters.
101+
/// Tests whether <see cref="NotFoundObjectResult"/> contains the provided output formatters.
102102
/// </summary>
103-
/// <param name="outputFormatters">Output formatter parameters.</param>
104-
/// <returns>The same HTTP not found test builder.</returns>
103+
/// <param name="outputFormatters"><see cref="IOutputFormatter"/> parameters.</param>
104+
/// <returns>The same <see cref="IAndNotFoundTestBuilder"/>.</returns>
105105
IAndNotFoundTestBuilder ContainingOutputFormatters(params IOutputFormatter[] outputFormatters);
106106
}
107107
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
namespace MyTested.Mvc.Builders.Contracts.ActionResults.Object
22
{
3+
/// <summary>
4+
/// Used for adding AndAlso() method to the <see cref="Microsoft.AspNetCore.Mvc.ObjectResult"/> tests.
5+
/// </summary>
36
public interface IAndObjectTestBuilder : IObjectTestBuilder
47
{
8+
/// <summary>
9+
/// AndAlso method for better readability when chaining <see cref="Microsoft.AspNetCore.Mvc.ObjectResult"/> tests.
10+
/// </summary>
11+
/// <returns>The same <see cref="IObjectTestBuilder"/>.</returns>
512
IObjectTestBuilder AndAlso();
613
}
714
}

0 commit comments

Comments
 (0)