use of teammates.common.util.EmailLogEntry in project teammates by TEAMMATES.
the class EmailLogEntryTest method emailLog_withAppLogLine_constructCorrectly.
@Test
public void emailLog_withAppLogLine_constructCorrectly() {
String logMessage = "TEAMMATESEMAILLOG|||myRecipient@email.com|||mySubject|||myContent";
AppLogLine appLog = new AppLogLine();
appLog.setLogMessage(logMessage);
appLog.setTimeUsec(2456L);
EmailLogEntry logEntry = new EmailLogEntry(appLog);
assertEquals(logMessage, logEntry.generateLogMessage());
assertEquals("myRecipient@email.com", logEntry.getReceiver());
assertEquals("mySubject", logEntry.getSubject());
assertEquals("myContent", logEntry.getContent());
assertEquals(2L, logEntry.getTime());
assertFalse(logEntry.isTestData());
}
use of teammates.common.util.EmailLogEntry in project teammates by TEAMMATES.
the class AdminEmailLogPageData method initLogsAsTemplateRows.
private void initLogsAsTemplateRows(List<EmailLogEntry> entries) {
logs = new ArrayList<>();
for (EmailLogEntry entry : entries) {
AdminEmailTableRow row = new AdminEmailTableRow(entry);
logs.add(row);
}
}
use of teammates.common.util.EmailLogEntry in project teammates by TEAMMATES.
the class EmailLogEntryTest method emailLog_withEmailWrapper_constructCorrectly.
@Test
public void emailLog_withEmailWrapper_constructCorrectly() {
EmailWrapper email = generateTypicalEmail();
EmailLogEntry logEntry = new EmailLogEntry(email);
assertEquals("TEAMMATESEMAILLOG|||myRecipient@email.tmt|||mySubject|||myContent", logEntry.generateLogMessage());
assertEquals("myRecipient@email.tmt", logEntry.getReceiver());
assertEquals("mySubject", logEntry.getSubject());
assertEquals("myContent", logEntry.getContent());
assertEquals(0, logEntry.getTime());
assertTrue(logEntry.isTestData());
}
Aggregations