File tree Expand file tree Collapse file tree 2 files changed +28
-18
lines changed
Expand file tree Collapse file tree 2 files changed +28
-18
lines changed Original file line number Diff line number Diff line change 11using System . IO ;
2- using System . Text ;
32using System . Threading . Tasks ;
4- using System . Xml ;
53using System . Xml . Linq ;
64using Xunit ;
75
86namespace Https . Tests
97{
10- public class IntegrationTests : IClassFixture < WebHostFixture >
8+ public class ContentTypeTests : IClassFixture < WebHostFixture >
119 {
1210 readonly WebHostFixture _fixture ;
13- public IntegrationTests ( WebHostFixture fixture ) =>
11+ public ContentTypeTests ( WebHostFixture fixture ) =>
1412 _fixture = fixture ;
1513
1614 [ Fact ]
@@ -64,19 +62,5 @@ public async Task MirrorTest_ShouldReflectXml()
6462
6563 Assert . Equal ( expected , actual ) ;
6664 }
67-
68- [ Fact ]
69- public async Task RedirectTest_ShouldShow3XXResponse_GivenStopAutoRedirects ( )
70- {
71- var args = new [ ]
72- {
73- "get" , "http://localhost:5000/Redirect" , "--stop-auto-redirects"
74- } ;
75-
76- var result = await Https . ExecuteAsync ( args ) ;
77-
78- Assert . Equal ( "HTTP/1.1 301 Moved Permanently" , result . Status ) ;
79- Assert . Equal ( "http://localhost:5000/Mirror" , result . Headers [ "Location" ] ) ;
80- }
8165 }
8266}
Original file line number Diff line number Diff line change 1+ using System . Threading . Tasks ;
2+ using Xunit ;
3+
4+ namespace Https . Tests
5+ {
6+ public class RedirectTests : IClassFixture < WebHostFixture >
7+ {
8+ readonly WebHostFixture _fixture ;
9+ public RedirectTests ( WebHostFixture fixture ) =>
10+ _fixture = fixture ;
11+
12+ [ Fact ]
13+ public async Task RedirectTest_ShouldShow3XXResponse_GivenStopAutoRedirects ( )
14+ {
15+ var args = new [ ]
16+ {
17+ "get" , $ "{ _fixture . HttpUrl } /Redirect", "--stop-auto-redirects"
18+ } ;
19+
20+ var result = await Https . ExecuteAsync ( args ) ;
21+
22+ Assert . Equal ( "HTTP/1.1 301 Moved Permanently" , result . Status ) ;
23+ Assert . Equal ( $ "{ _fixture . HttpUrl } /Mirror", result . Headers [ "Location" ] ) ;
24+ }
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments