|
46 | 46 |
|
47 | 47 | /* |
48 | 48 | * Known issues while testing |
49 | | - * |
| 49 | + * |
50 | 50 | * ECLEmma coverage plugin incompatible with PowerMock |
51 | 51 | * http://stackoverflow.com/questions/23363212/powermock-eclemma-coverage-issue |
52 | 52 | * |
53 | 53 | * import org.junit.runner.RunWith; |
54 | | - * import org.powermock.modules.junit4.PowerMockRunner; |
| 54 | + * import org.powermock.modules.junit4.PowerMockRunner; |
55 | 55 | * @RunWith(PowerMockRunner.class) |
56 | | - * |
| 56 | + * |
57 | 57 | */ |
58 | 58 | @PrepareForTest({Auth.class}) |
59 | 59 | public class AuthTest { |
60 | 60 |
|
61 | 61 | /* |
62 | | - * When using @PrepareForTest and PowerMockito the breakpoints when debugging |
| 62 | + * When using @PrepareForTest and PowerMockito the breakpoints when debugging |
63 | 63 | * does not work. Define Rules! |
64 | 64 | * (http://stackoverflow.com/questions/35140575/powermockito-junit-and-eclemma-debugging-dosent-work) |
65 | | - * |
| 65 | + * |
66 | 66 | * https://github.com/jayway/powermock/wiki/PowerMockRule |
67 | | - * |
| 67 | + * |
68 | 68 | * import org.junit.Rule; |
69 | 69 | * import org.powermock.modules.junit4.rule.PowerMockRule; |
70 | 70 | * @Rule |
71 | 71 | * public PowerMockRule rule = new PowerMockRule(); |
72 | | - * |
| 72 | + * |
73 | 73 | */ |
74 | | - |
| 74 | + |
75 | 75 | //import org.powermock.modules.junit4.rule.PowerMockRule; |
76 | 76 | //@Rule |
77 | 77 | //public PowerMockRule rule = new PowerMockRule(); |
@@ -527,7 +527,7 @@ public void testProcessSLORequestSignRes() throws Exception { |
527 | 527 | assertFalse(auth.isAuthenticated()); |
528 | 528 | assertTrue(auth.getErrors().isEmpty()); |
529 | 529 | auth.processSLO(); |
530 | | - verify(response).sendRedirect(matches("http:\\/\\/idp.example.com\\/simplesaml\\/saml2\\/idp\\/SingleLogoutService.php\\?SAMLResponse=(.)*&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha512&RelayState=http%3A%2F%2Flocalhost%3A8080%2Fexpected.jsp&Signature=(.)*")); |
| 530 | + verify(response).sendRedirect(matches("http:\\/\\/idp.example.com\\/simplesaml\\/saml2\\/idp\\/SingleLogoutService.php\\?SAMLResponse=(.)*&RelayState=http%3A%2F%2Flocalhost%3A8080%2Fexpected.jsp&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha512&Signature=(.)*")); |
531 | 531 | verify(session, times(1)).invalidate(); |
532 | 532 | assertTrue(auth.getErrors().isEmpty()); |
533 | 533 | } |
|
0 commit comments