|
1 |
| -using System; |
2 |
| -using System.Collections.Generic; |
3 |
| -using System.Diagnostics; |
4 |
| -using System.Net; |
5 |
| -using System.Threading.Tasks; |
6 |
| - |
7 |
| -using Ocelot.Configuration.File; |
8 |
| - |
9 |
| -using Microsoft.AspNetCore.Http; |
10 |
| - |
11 |
| -using Ocelot.Middleware; |
12 |
| - |
13 |
| -using Shouldly; |
14 |
| - |
15 |
| -using TestStack.BDDfy; |
16 |
| - |
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Diagnostics; |
| 4 | +using System.Net; |
| 5 | +using System.Threading.Tasks; |
| 6 | + |
| 7 | +using Ocelot.Configuration.File; |
| 8 | + |
| 9 | +using Microsoft.AspNetCore.Http; |
| 10 | + |
| 11 | +using Ocelot.Middleware; |
| 12 | + |
| 13 | +using Shouldly; |
| 14 | + |
| 15 | +using TestStack.BDDfy; |
| 16 | + |
17 | 17 | using Xunit;
|
18 | 18 |
|
19 | 19 | namespace Ocelot.AcceptanceTests
|
@@ -257,6 +257,7 @@ public void should_call_pre_authorization_middleware()
|
257 | 257 | .And(x => x.ThenTheCounterIs(1))
|
258 | 258 | .BDDfy();
|
259 | 259 | }
|
| 260 | + |
260 | 261 | [Fact]
|
261 | 262 | public void should_call_after_authorization_middleware()
|
262 | 263 | {
|
@@ -301,6 +302,7 @@ public void should_call_after_authorization_middleware()
|
301 | 302 | .And(x => x.ThenTheCounterIs(1))
|
302 | 303 | .BDDfy();
|
303 | 304 | }
|
| 305 | + |
304 | 306 | [Fact]
|
305 | 307 | public void should_call_pre_http_authentication_middleware()
|
306 | 308 | {
|
@@ -345,6 +347,7 @@ public void should_call_pre_http_authentication_middleware()
|
345 | 347 | .And(x => x.ThenTheCounterIs(1))
|
346 | 348 | .BDDfy();
|
347 | 349 | }
|
| 350 | + |
348 | 351 | [Fact]
|
349 | 352 | public void should_call_after_http_authentication_middleware()
|
350 | 353 | {
|
@@ -389,6 +392,7 @@ public void should_call_after_http_authentication_middleware()
|
389 | 392 | .And(x => x.ThenTheCounterIs(1))
|
390 | 393 | .BDDfy();
|
391 | 394 | }
|
| 395 | + |
392 | 396 | [Fact(Skip = "This is just an example to show how you could hook into Ocelot pipeline with your own middleware. At the moment you must use Response.OnCompleted callback and cannot change the response :( I will see if this can be changed one day!")]
|
393 | 397 | public void should_fix_issue_237()
|
394 | 398 | {
|
|
0 commit comments