File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
servlet/security-basicauth/src/test/java/org/javaee7/servlet/security/basicauth Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public static WebArchive createDeployment() {
3535 }
3636
3737 @ Test
38- public void testSecureServletWithCorrectCredentials () throws Exception {
38+ public void testWithCorrectCredentials () throws Exception {
3939 WebConversation conv = new WebConversation ();
4040 conv .setAuthentication ("file" , "u1" , "p1" );
4141 GetMethodWebRequest getRequest = new GetMethodWebRequest (base + "/SecureServlet" );
@@ -50,14 +50,15 @@ public void testSecureServletWithCorrectCredentials() throws Exception {
5050 }
5151
5252 @ Test
53- public void testSecureServletWithIncorrectCredentials () throws Exception {
53+ public void testWithIncorrectCredentials () throws Exception {
5454 WebConversation conv = new WebConversation ();
5555 conv .setAuthentication ("file" , "u" , "p1" );
5656 GetMethodWebRequest getRequest = new GetMethodWebRequest (base + "/SecureServlet" );
5757 try {
5858 conv .getResponse (getRequest );
5959 } catch (AuthorizationRequiredException e ) {
6060 assertNotNull (e );
61+ assertEquals ("Basic" , e .getAuthenticationScheme ());
6162 return ;
6263 }
6364 fail ("/SecureServlet could be accessed without proper security credentials" );
You can’t perform that action at this time.
0 commit comments