Skip to content
Snippets Groups Projects
Commit faa142b0 authored by felmer's avatar felmer
Browse files

bug in test fixed: reset recorder

SVN: 730
parent 04a27f0d
No related branches found
No related tags found
No related merge requests found
...@@ -119,6 +119,7 @@ public class CrowdAuthenticationServiceTest ...@@ -119,6 +119,7 @@ public class CrowdAuthenticationServiceTest
}); });
logRecorder.reset();
String result = authenticationService.authenticateApplication(); String result = authenticationService.authenticateApplication();
assertEquals(APPLICATION_TOKEN, result); assertEquals(APPLICATION_TOKEN, result);
assertEquals(createDebugLogEntry("CROWD: application '" + APPLICATION + "' successfully authenticated."), assertEquals(createDebugLogEntry("CROWD: application '" + APPLICATION + "' successfully authenticated."),
...@@ -140,6 +141,7 @@ public class CrowdAuthenticationServiceTest ...@@ -140,6 +141,7 @@ public class CrowdAuthenticationServiceTest
} }
}); });
logRecorder.reset();
String result = authenticationService.authenticateApplication(); String result = authenticationService.authenticateApplication();
assertEquals(null, result); assertEquals(null, result);
assertEquals(createDebugLogEntry("Element '" + CrowdSoapElements.TOKEN + "' could not be found in 'error'.") assertEquals(createDebugLogEntry("Element '" + CrowdSoapElements.TOKEN + "' could not be found in 'error'.")
...@@ -163,6 +165,7 @@ public class CrowdAuthenticationServiceTest ...@@ -163,6 +165,7 @@ public class CrowdAuthenticationServiceTest
} }
}); });
logRecorder.reset();
boolean result = authenticationService.authenticateUser(APPLICATION_TOKEN, USER, USER_PASSWORD); boolean result = authenticationService.authenticateUser(APPLICATION_TOKEN, USER, USER_PASSWORD);
assertEquals(true, result); assertEquals(true, result);
assertEquals(createInfoLogEntry("CROWD: authentication of user '" + USER + "', application '" + APPLICATION assertEquals(createInfoLogEntry("CROWD: authentication of user '" + USER + "', application '" + APPLICATION
...@@ -185,6 +188,7 @@ public class CrowdAuthenticationServiceTest ...@@ -185,6 +188,7 @@ public class CrowdAuthenticationServiceTest
} }
}); });
logRecorder.reset();
boolean result = authenticationService.authenticateUser(APPLICATION_TOKEN, USER, USER_PASSWORD); boolean result = authenticationService.authenticateUser(APPLICATION_TOKEN, USER, USER_PASSWORD);
assertEquals(false, result); assertEquals(false, result);
assertEquals(createDebugLogEntry("Element '" + CrowdSoapElements.OUT + "' could not be found in 'error'.") assertEquals(createDebugLogEntry("Element '" + CrowdSoapElements.OUT + "' could not be found in 'error'.")
...@@ -219,6 +223,7 @@ public class CrowdAuthenticationServiceTest ...@@ -219,6 +223,7 @@ public class CrowdAuthenticationServiceTest
} }
}); });
logRecorder.reset();
Principal result = authenticationService.getPrincipal(APPLICATION_TOKEN, USER); Principal result = authenticationService.getPrincipal(APPLICATION_TOKEN, USER);
assertEquals("Justen", result.getFirstName()); assertEquals("Justen", result.getFirstName());
assertEquals("Stepka", result.getLastName()); assertEquals("Stepka", result.getLastName());
...@@ -245,6 +250,7 @@ public class CrowdAuthenticationServiceTest ...@@ -245,6 +250,7 @@ public class CrowdAuthenticationServiceTest
} }
}); });
logRecorder.reset();
try try
{ {
authenticationService.getPrincipal(APPLICATION_TOKEN, USER); authenticationService.getPrincipal(APPLICATION_TOKEN, USER);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment