Skip to content
Snippets Groups Projects
Commit 5be97c0a authored by kaloyane's avatar kaloyane
Browse files

fix failing test build

SVN: 23437
parent dfe117f5
No related branches found
No related tags found
No related merge requests found
......@@ -115,8 +115,7 @@ public class CrowdAuthenticationServiceTest
final boolean result =
authenticationService.authenticateUser(USER, USER_PASSWORD);
assertEquals(true, result);
assertEquals(createDebugLogEntry("CROWD: application '" + APPLICATION
+ "' successfully authenticated.")
assertEquals(createAuthenticatedSuccessfullyLog()
+ OSUtilities.LINE_SEPARATOR
+ createInfoLogEntry("CROWD: authentication of user '" + USER + "', application '"
+ APPLICATION + "': SUCCESS."), logRecorder.getLogContent());
......@@ -150,8 +149,7 @@ public class CrowdAuthenticationServiceTest
final boolean result =
authenticationService.authenticateUser(USER, USER_PASSWORD);
assertEquals(false, result);
assertEquals(createDebugLogEntry("CROWD: application '" + APPLICATION
+ "' successfully authenticated.")
assertEquals(createAuthenticatedSuccessfullyLog()
+ OSUtilities.LINE_SEPARATOR
+ createDebugLogEntry("Element '" + CrowdSoapElements.OUT
+ "' could not be found in 'error'.")
......@@ -205,8 +203,7 @@ public class CrowdAuthenticationServiceTest
assertEquals("false", result.getProperty("requiresPasswordChange"));
assertEquals("1169440408520", result.getProperty("lastAuthenticated"));
assertEquals("1168995491407", result.getProperty("passwordLastChanged"));
assertEquals(createDebugLogEntry("CROWD: application '" + APPLICATION
+ "' successfully authenticated."), logRecorder.getLogContent());
assertEquals(createAuthenticatedSuccessfullyLog(), logRecorder.getLogContent());
context.assertIsSatisfied();
}
......@@ -241,8 +238,7 @@ public class CrowdAuthenticationServiceTest
}
assertEquals(
createDebugLogEntry("CROWD: application '" + APPLICATION
+ "' successfully authenticated.")
createAuthenticatedSuccessfullyLog()
+ OSUtilities.LINE_SEPARATOR
+ createDebugLogEntry("No SOAPAttribute element could be found in the SOAP XML response."),
logRecorder.getLogContent());
......@@ -250,6 +246,17 @@ public class CrowdAuthenticationServiceTest
context.assertIsSatisfied();
}
private String createAuthenticatedSuccessfullyLog()
{
final String authenticateLogs =
createInfoLogEntry("CROWD: Attempting to authenticate as application "
+ APPLICATION + "...")
+ OSUtilities.LINE_SEPARATOR
+ createInfoLogEntry("CROWD: application '" + APPLICATION
+ "' successfully authenticated.");
return authenticateLogs;
}
private String createDebugLogEntry(final String message)
{
return createLogEntry("DEBUG", message);
......
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