|
10 | 10 | using Models;
|
11 | 11 |
|
12 | 12 | /// <summary>
|
13 |
| - /// Used for testing HTTP bad request results. |
| 13 | + /// Used for testing <see cref="BadRequestResult"/> and <see cref="BadRequestObjectResult"/>. |
14 | 14 | /// </summary>
|
15 | 15 | public interface IBadRequestTestBuilder : IBaseTestBuilderWithActionResult<ActionResult>
|
16 | 16 | {
|
17 | 17 | /// <summary>
|
18 |
| - /// Tests whether HTTP bad request result contains deeply equal error value as the provided error object. |
| 18 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains deeply equal error value as the provided error object. |
19 | 19 | /// </summary>
|
20 | 20 | /// <typeparam name="TError">Type of error object.</typeparam>
|
21 | 21 | /// <param name="error">Error object.</param>
|
22 | 22 | /// <returns>Test builder of type <see cref="IModelDetailsTestBuilder{TError}"/>.</returns>
|
23 | 23 | IModelDetailsTestBuilder<TError> WithError<TError>(TError error);
|
24 | 24 |
|
25 | 25 | /// <summary>
|
26 |
| - /// Tests whether HTTP bad request result contains error object of the provided type. |
| 26 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains error object of the provided type. |
27 | 27 | /// </summary>
|
28 | 28 | /// <typeparam name="TError">Type of error object.</typeparam>
|
29 | 29 | /// <returns>Test builder of type <see cref="IModelDetailsTestBuilder{TError}"/>.</returns>
|
30 | 30 | IModelDetailsTestBuilder<TError> WithErrorOfType<TError>();
|
31 | 31 |
|
32 | 32 | /// <summary>
|
33 |
| - /// Tests whether no specific error is returned from the HTTP bad request result. |
| 33 | + /// Tests whether no specific error is returned from the <see cref="BadRequestObjectResult"/>. |
34 | 34 | /// </summary>
|
35 | 35 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
36 | 36 | IAndBadRequestTestBuilder WithNoError();
|
37 | 37 |
|
38 | 38 | /// <summary>
|
39 |
| - /// Tests HTTP bad request result with specific text error message using test builder. |
| 39 | + /// Tests <see cref="BadRequestObjectResult"/> with specific text error message using test builder. |
40 | 40 | /// </summary>
|
41 | 41 | /// <returns><see cref="IBadRequestErrorMessageTestBuilder"/>.</returns>
|
42 | 42 | IBadRequestErrorMessageTestBuilder WithErrorMessage();
|
43 | 43 |
|
44 | 44 | /// <summary>
|
45 |
| - /// Tests HTTP bad request result with specific text error message provided by string. |
| 45 | + /// Tests <see cref="BadRequestObjectResult"/> with specific text error message provided by string. |
46 | 46 | /// </summary>
|
47 |
| - /// <param name="message">Expected error message from bad request result.</param> |
| 47 | + /// <param name="message">Expected error message.</param> |
48 | 48 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
49 | 49 | IAndBadRequestTestBuilder WithErrorMessage(string message);
|
50 | 50 |
|
51 | 51 | /// <summary>
|
52 |
| - /// Tests whether HTTP bad request result contains the controller's <see cref="ModelStateDictionary"/> as object error. |
| 52 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the controller's <see cref="ModelStateDictionary"/> as object error. |
53 | 53 | /// </summary>
|
54 | 54 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
55 | 55 | IAndBadRequestTestBuilder WithModelStateError();
|
56 | 56 |
|
57 | 57 | /// <summary>
|
58 |
| - /// Tests HTTP bad request result with specific <see cref="ModelStateDictionary"/>. |
| 58 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains specific <see cref="ModelStateDictionary"/>. |
59 | 59 | /// </summary>
|
60 | 60 | /// <param name="modelState"><see cref="ModelStateDictionary"/> to deeply compare to the actual one.</param>
|
61 | 61 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
62 | 62 | IAndBadRequestTestBuilder WithModelStateError(ModelStateDictionary modelState);
|
63 | 63 |
|
64 | 64 | /// <summary>
|
65 |
| - /// Tests HTTP bad request result for model state errors using test builder. |
| 65 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains specific model state errors using test builder. |
66 | 66 | /// </summary>
|
67 | 67 | /// <typeparam name="TRequestModel">Type of model for which the model state errors will be tested.</typeparam>
|
68 | 68 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
69 | 69 | IModelErrorTestBuilder<TRequestModel> WithModelStateErrorFor<TRequestModel>();
|
70 | 70 |
|
71 | 71 | /// <summary>
|
72 |
| - /// Tests whether HTTP bad request result has the same status code as the provided one. |
| 72 | + /// Tests whether <see cref="BadRequestResult"/> or <see cref="BadRequestObjectResult"/> has the same status code as the provided one. |
73 | 73 | /// </summary>
|
74 |
| - /// <param name="statusCode">Status code.</param> |
| 74 | + /// <param name="statusCode">Status code as integer.</param> |
75 | 75 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
76 | 76 | IAndBadRequestTestBuilder WithStatusCode(int statusCode);
|
77 | 77 |
|
78 | 78 | /// <summary>
|
79 |
| - /// Tests whether HTTP bad request has the same status code as the provided <see cref="HttpStatusCode"/>. |
| 79 | + /// Tests whether <see cref="BadRequestResult"/> or <see cref="BadRequestObjectResult"/> has the same status code as the provided <see cref="HttpStatusCode"/>. |
80 | 80 | /// </summary>
|
81 | 81 | /// <param name="statusCode"><see cref="HttpStatusCode"/> enumeration.</param>
|
82 | 82 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
83 | 83 | IAndBadRequestTestBuilder WithStatusCode(HttpStatusCode statusCode);
|
84 | 84 |
|
85 | 85 | /// <summary>
|
86 |
| - /// Tests whether HTTP bad request result contains the content type provided as string. |
| 86 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the content type provided as string. |
87 | 87 | /// </summary>
|
88 | 88 | /// <param name="contentType">Content type as string.</param>
|
89 | 89 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
90 | 90 | IAndBadRequestTestBuilder ContainingContentType(string contentType);
|
91 | 91 |
|
92 | 92 | /// <summary>
|
93 |
| - /// Tests whether HTTP bad request result contains the content type provided as <see cref="MediaTypeHeaderValue"/>. |
| 93 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the content type provided as <see cref="MediaTypeHeaderValue"/>. |
94 | 94 | /// </summary>
|
95 | 95 | /// <param name="contentType">Content type as MediaTypeHeaderValue.</param>
|
96 | 96 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
97 | 97 | IAndBadRequestTestBuilder ContainingContentType(MediaTypeHeaderValue contentType);
|
98 | 98 |
|
99 | 99 | /// <summary>
|
100 |
| - /// Tests whether HTTP bad request result contains the same content types provided as enumerable of strings. |
| 100 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as enumerable of strings. |
101 | 101 | /// </summary>
|
102 | 102 | /// <param name="contentTypes">Content types as enumerable of strings.</param>
|
103 | 103 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
104 | 104 | IAndBadRequestTestBuilder ContainingContentTypes(IEnumerable<string> contentTypes);
|
105 | 105 |
|
106 | 106 | /// <summary>
|
107 |
| - /// Tests whether HTTP bad request result contains the same content types provided as string parameters. |
| 107 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as string parameters. |
108 | 108 | /// </summary>
|
109 | 109 | /// <param name="contentTypes">Content types as string parameters.</param>
|
110 | 110 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
111 | 111 | IAndBadRequestTestBuilder ContainingContentTypes(params string[] contentTypes);
|
112 | 112 |
|
113 | 113 | /// <summary>
|
114 |
| - /// Tests whether HTTP bad request result 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 enumerable of <see cref="MediaTypeHeaderValue"/>. |
115 | 115 | /// </summary>
|
116 | 116 | /// <param name="contentTypes">Content types as enumerable of <see cref="MediaTypeHeaderValue"/>.</param>
|
117 | 117 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
118 | 118 | IAndBadRequestTestBuilder ContainingContentTypes(IEnumerable<MediaTypeHeaderValue> contentTypes);
|
119 | 119 |
|
120 | 120 | /// <summary>
|
121 |
| - /// Tests whether HTTP bad request result contains the same content types provided as <see cref="MediaTypeHeaderValue"/> parameters. |
| 121 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the same content types provided as <see cref="MediaTypeHeaderValue"/> parameters. |
122 | 122 | /// </summary>
|
123 | 123 | /// <param name="contentTypes">Content types as <see cref="MediaTypeHeaderValue"/> parameters.</param>
|
124 | 124 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
125 | 125 | IAndBadRequestTestBuilder ContainingContentTypes(params MediaTypeHeaderValue[] contentTypes);
|
126 | 126 |
|
127 | 127 | /// <summary>
|
128 |
| - /// Tests whether HTTP bad request result contains the provided output formatter. |
| 128 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the provided output formatter. |
129 | 129 | /// </summary>
|
130 | 130 | /// <param name="outputFormatter">Instance of <see cref="IOutputFormatter"/>.</param>
|
131 | 131 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
132 | 132 | IAndBadRequestTestBuilder ContainingOutputFormatter(IOutputFormatter outputFormatter);
|
133 | 133 |
|
134 | 134 | /// <summary>
|
135 |
| - /// Tests whether HTTP bad request result contains output formatter of the provided type. |
| 135 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains output formatter of the provided type. |
136 | 136 | /// </summary>
|
137 | 137 | /// <typeparam name="TOutputFormatter">Type of <see cref="IOutputFormatter"/>.</typeparam>
|
138 | 138 | /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns>
|
139 | 139 | IAndBadRequestTestBuilder ContainingOutputFormatterOfType<TOutputFormatter>()
|
140 | 140 | where TOutputFormatter : IOutputFormatter;
|
141 | 141 |
|
142 | 142 | /// <summary>
|
143 |
| - /// Tests whether HTTP bad request result contains the provided output formatters. |
| 143 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the provided output formatters. |
144 | 144 | /// </summary>
|
145 | 145 | /// <param name="outputFormatters">Enumerable of <see cref="IOutputFormatter"/>.</param>
|
146 |
| - /// <returns>The same HTTP bad request test builder.</returns> |
| 146 | + /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns> |
147 | 147 | IAndBadRequestTestBuilder ContainingOutputFormatters(IEnumerable<IOutputFormatter> outputFormatters);
|
148 | 148 |
|
149 | 149 | /// <summary>
|
150 |
| - /// Tests whether HTTP bad request result contains the provided output formatters. |
| 150 | + /// Tests whether <see cref="BadRequestObjectResult"/> contains the provided output formatters. |
151 | 151 | /// </summary>
|
152 | 152 | /// <param name="outputFormatters"><see cref="IOutputFormatter"/> parameters.</param>
|
153 |
| - /// <returns>The same HTTP bad request test builder.</returns> |
| 153 | + /// <returns>The same <see cref="IAndBadRequestTestBuilder"/>.</returns> |
154 | 154 | IAndBadRequestTestBuilder ContainingOutputFormatters(params IOutputFormatter[] outputFormatters);
|
155 | 155 | }
|
156 | 156 | }
|
0 commit comments