@@ -37,12 +37,12 @@ public ErrorHandlingTests(ITestOutputHelper testOutputHelper) : base(testOutputH
3737 [ Theory ]
3838 [ Priority ( 2 ) ]
3939 [ Category ( "P2Tests" ) ]
40- [ InlineData ( "/" , "__Controller::TempData" , "Message=You successfully uploaded z̡̜͍̈̍̐̃̊͋́a̜̣͍̬̞̝͉̽ͧ͗l̸̖͕̤̠̹̘͖̃̌ͤg͓̝͓̰̀ͪo͈͌ 1.0.0." , 400 , false ) ]
41- [ InlineData ( "/" , "__Controller::TempData" , "Message=<script>alert(1)</script>" , 400 , false ) ]
42- [ InlineData ( "/" , "__Controller::TempData" , "<script>alert(1)</script>" , 400 , false ) ]
43- [ InlineData ( "/packages" , "nugetab" , "<script>alert(1)</script>" , 400 , true ) ]
44- [ InlineData ( "/packages" , "nugetab" , "z̡̜͍̈̍̐̃̊͋́a̜̣͍̬̞̝͉̽ͧ͗l̸̖͕̤̠̹̘͖̃̌ͤg͓̝͓̰̀ͪo͈͌" , 400 , false ) ]
45- public async Task RejectedCookie ( string relativePath , string name , string value , int statusCode , bool pretty )
40+ [ InlineData ( "/" , "__Controller::TempData" , "Message=You successfully uploaded z̡̜͍̈̍̐̃̊͋́a̜̣͍̬̞̝͉̽ͧ͗l̸̖͕̤̠̹̘͖̃̌ͤg͓̝͓̰̀ͪo͈͌ 1.0.0." , 400 ) ]
41+ [ InlineData ( "/" , "__Controller::TempData" , "Message=<script>alert(1)</script>" , 400 ) ]
42+ [ InlineData ( "/" , "__Controller::TempData" , "<script>alert(1)</script>" , 400 ) ]
43+ [ InlineData ( "/packages" , "nugetab" , "<script>alert(1)</script>" , 400 ) ]
44+ [ InlineData ( "/packages" , "nugetab" , "z̡̜͍̈̍̐̃̊͋́a̜̣͍̬̞̝͉̽ͧ͗l̸̖͕̤̠̹̘͖̃̌ͤg͓̝͓̰̀ͪo͈͌" , 400 ) ]
45+ public async Task RejectedCookie ( string relativePath , string name , string value , int statusCode )
4646 {
4747 // Arrange
4848 _httpClientHandler . UseCookies = false ;
@@ -55,14 +55,7 @@ public async Task RejectedCookie(string relativePath, string name, string value,
5555 var response = await GetTestResponseAsync ( relativePath , request ) ;
5656
5757 // Assert
58- if ( pretty )
59- {
60- Validator . PrettyHtml ( ( HttpStatusCode ) statusCode ) ( response ) ;
61- }
62- else
63- {
64- Validator . SimpleHtml ( ( HttpStatusCode ) statusCode ) ( response ) ;
65- }
58+ Assert . Equal ( ( HttpStatusCode ) statusCode , response . StatusCode ) ;
6659 }
6760 }
6861
0 commit comments