@@ -13,7 +13,8 @@ public class FunctionalTests : IntegrationTestBase
1313 [ Arguments ( "/alive" ) ]
1414 public async Task WhenTheApplicationStarts_ItCanLoadLoadPages ( string relativeUrl )
1515 {
16- using HttpResponseMessage response = await GetFollowingRedirectsAsync ( relativeUrl ) ;
16+ using HttpClient client = Factory . CreateClient ( ) ;
17+ using HttpResponseMessage response = await GetFollowingGetRedirectsAsync ( client , relativeUrl ) ;
1718
1819 await Assert . That ( response . StatusCode ) . IsEqualTo ( HttpStatusCode . OK ) ;
1920 }
@@ -28,7 +29,8 @@ public async Task WhenTheApplicationStarts_ItCanLoadLoadPages(string relativeUrl
2829 [ Arguments ( "/about?someOtherParam=value" ) ]
2930 public async Task WhenPagesAreAccessed_TheyReturnHtml ( string relativeUrl )
3031 {
31- using HttpResponseMessage response = await GetFollowingRedirectsAsync ( relativeUrl ) ;
32+ using HttpClient client = Factory . CreateClient ( ) ;
33+ using HttpResponseMessage response = await GetFollowingGetRedirectsAsync ( client , relativeUrl ) ;
3234
3335 await Assert . That ( response . StatusCode ) . IsEqualTo ( HttpStatusCode . OK ) ;
3436
@@ -43,7 +45,8 @@ public async Task WhenPagesAreAccessed_TheyReturnHtml(string relativeUrl)
4345 [ Test ]
4446 public async Task WhenTheApplicationStarts_NonExistingPage_GivesCorrectStatusCode ( )
4547 {
46- using HttpResponseMessage response = await GetFollowingRedirectsAsync ( "/non-existing-page1234" ) ;
48+ using HttpClient client = Factory . CreateClient ( ) ;
49+ using HttpResponseMessage response = await GetFollowingGetRedirectsAsync ( client , "/non-existing-page1234" ) ;
4750
4851 await Assert . That ( response . StatusCode ) . IsEqualTo ( HttpStatusCode . NotFound ) ;
4952 }
0 commit comments