@@ -21,9 +21,9 @@ public AccountControllerSignIn(TestApplication factory)
2121 [ Fact ]
2222 public async Task ReturnsSignInScreenOnGet ( )
2323 {
24- var response = await Client . GetAsync ( "/identity/account/login" ) ;
24+ var response = await Client . GetAsync ( "/identity/account/login" , TestContext . Current . CancellationToken ) ;
2525 response . EnsureSuccessStatusCode ( ) ;
26- var stringResponse = await response . Content . ReadAsStringAsync ( ) ;
26+ var stringResponse = await response . Content . ReadAsStringAsync ( TestContext . Current . CancellationToken ) ;
2727
2828 Assert . Contains ( "[email protected] " , stringResponse ) ; 2929 }
@@ -45,9 +45,9 @@ public void RegexMatchesValidRequestVerificationToken()
4545 [ Fact ]
4646 public async Task ReturnsFormWithRequestVerificationToken ( )
4747 {
48- var response = await Client . GetAsync ( "/identity/account/login" ) ;
48+ var response = await Client . GetAsync ( "/identity/account/login" , TestContext . Current . CancellationToken ) ;
4949 response . EnsureSuccessStatusCode ( ) ;
50- var stringResponse = await response . Content . ReadAsStringAsync ( ) ;
50+ var stringResponse = await response . Content . ReadAsStringAsync ( TestContext . Current . CancellationToken ) ;
5151
5252 string token = WebPageHelpers . GetRequestVerificationToken ( stringResponse ) ;
5353 Assert . True ( token . Length > 50 ) ;
@@ -56,19 +56,19 @@ public async Task ReturnsFormWithRequestVerificationToken()
5656 [ Fact ]
5757 public async Task ReturnsSuccessfulSignInOnPostWithValidCredentials ( )
5858 {
59- var getResponse = await Client . GetAsync ( "/identity/account/login" ) ;
59+ var getResponse = await Client . GetAsync ( "/identity/account/login" , TestContext . Current . CancellationToken ) ;
6060 getResponse . EnsureSuccessStatusCode ( ) ;
61- var stringResponse1 = await getResponse . Content . ReadAsStringAsync ( ) ;
61+ var stringResponse1 = await getResponse . Content . ReadAsStringAsync ( TestContext . Current . CancellationToken ) ;
6262
6363 var keyValues = new List < KeyValuePair < string , string > >
6464 {
65- new KeyValuePair < string , string > ( "Email" , "[email protected] " ) , 66- new KeyValuePair < string , string > ( "Password" , "Pass@word1" ) ,
67- new KeyValuePair < string , string > ( WebPageHelpers . TokenTag , WebPageHelpers . GetRequestVerificationToken ( stringResponse1 ) )
65+ new ( "Email" , "[email protected] " ) , 66+ new ( "Password" , "Pass@word1" ) ,
67+ new ( WebPageHelpers . TokenTag , WebPageHelpers . GetRequestVerificationToken ( stringResponse1 ) )
6868 } ;
6969 var formContent = new FormUrlEncodedContent ( keyValues ) ;
7070
71- var postResponse = await Client . PostAsync ( "/identity/account/login" , formContent ) ;
71+ var postResponse = await Client . PostAsync ( "/identity/account/login" , formContent , TestContext . Current . CancellationToken ) ;
7272 Assert . Equal ( HttpStatusCode . Redirect , postResponse . StatusCode ) ;
7373 Assert . Equal ( new System . Uri ( "/" , UriKind . Relative ) , postResponse . Headers . Location ) ;
7474 }
@@ -77,36 +77,36 @@ public async Task ReturnsSuccessfulSignInOnPostWithValidCredentials()
7777 public async Task UpdatePhoneNumberProfile ( )
7878 {
7979 //Login
80- var getResponse = await Client . GetAsync ( "/identity/account/login" ) ;
80+ var getResponse = await Client . GetAsync ( "/identity/account/login" , TestContext . Current . CancellationToken ) ;
8181 getResponse . EnsureSuccessStatusCode ( ) ;
82- var stringResponse1 = await getResponse . Content . ReadAsStringAsync ( ) ;
82+ var stringResponse1 = await getResponse . Content . ReadAsStringAsync ( TestContext . Current . CancellationToken ) ;
8383 var keyValues = new List < KeyValuePair < string , string > >
8484 {
85- new KeyValuePair < string , string > ( "Email" , "[email protected] " ) , 86- new KeyValuePair < string , string > ( "Password" , "Pass@word1" ) ,
87- new KeyValuePair < string , string > ( WebPageHelpers . TokenTag , WebPageHelpers . GetRequestVerificationToken ( stringResponse1 ) )
85+ new ( "Email" , "[email protected] " ) , 86+ new ( "Password" , "Pass@word1" ) ,
87+ new ( WebPageHelpers . TokenTag , WebPageHelpers . GetRequestVerificationToken ( stringResponse1 ) )
8888 } ;
8989 var formContent = new FormUrlEncodedContent ( keyValues ) ;
90- await Client . PostAsync ( "/identity/account/login" , formContent ) ;
90+ await Client . PostAsync ( "/identity/account/login" , formContent , TestContext . Current . CancellationToken ) ;
9191
9292 //Profile page
93- var profileResponse = await Client . GetAsync ( "/manage/my-account" ) ;
93+ var profileResponse = await Client . GetAsync ( "/manage/my-account" , TestContext . Current . CancellationToken ) ;
9494 profileResponse . EnsureSuccessStatusCode ( ) ;
95- var stringProfileResponse = await profileResponse . Content . ReadAsStringAsync ( ) ;
95+ var stringProfileResponse = await profileResponse . Content . ReadAsStringAsync ( TestContext . Current . CancellationToken ) ;
9696
9797 //Update phone number
9898 var updateProfileValues = new List < KeyValuePair < string , string > >
9999 {
100- new KeyValuePair < string , string > ( "Email" , "[email protected] " ) , 101- new KeyValuePair < string , string > ( "PhoneNumber" , "03656565" ) ,
102- new KeyValuePair < string , string > ( WebPageHelpers . TokenTag , WebPageHelpers . GetRequestVerificationToken ( stringProfileResponse ) )
100+ new ( "Email" , "[email protected] " ) , 101+ new ( "PhoneNumber" , "03656565" ) ,
102+ new ( WebPageHelpers . TokenTag , WebPageHelpers . GetRequestVerificationToken ( stringProfileResponse ) )
103103 } ;
104104 var updateProfileContent = new FormUrlEncodedContent ( updateProfileValues ) ;
105- var postProfileResponse = await Client . PostAsync ( "/manage/my-account" , updateProfileContent ) ;
105+ var postProfileResponse = await Client . PostAsync ( "/manage/my-account" , updateProfileContent , TestContext . Current . CancellationToken ) ;
106106
107107 Assert . Equal ( HttpStatusCode . Redirect , postProfileResponse . StatusCode ) ;
108- var profileResponse2 = await Client . GetAsync ( "/manage/my-account" ) ;
109- var stringProfileResponse2 = await profileResponse2 . Content . ReadAsStringAsync ( ) ;
108+ var profileResponse2 = await Client . GetAsync ( "/manage/my-account" , TestContext . Current . CancellationToken ) ;
109+ var stringProfileResponse2 = await profileResponse2 . Content . ReadAsStringAsync ( TestContext . Current . CancellationToken ) ;
110110 Assert . Contains ( "03656565" , stringProfileResponse2 ) ;
111111
112112 }
0 commit comments