Fakultas Ilmu Komputer UI

Commit 0e6d715a authored by saddamonpc's avatar saddamonpc
Browse files

Edit print output to allow tests on different environments

parent a5844345
Pipeline #81533 passed with stage
in 1 minute and 17 seconds
......@@ -56,10 +56,21 @@ class TeachingAssistantTest {
testTa.setSchedule("monday", "Busy", "07:00", "21:00");
testTa.seeCalendar();
// Remove all linebreaks from the print, since different environment uses different line separators
String outContentEdit = outContent.toString().replaceAll("\n", "").replaceAll("\r", "");
String expectedOutput =
"Monday:\r\nBusy 07:00 - 21:00\r\n" +
"Tuesday:\r\nWednesday:\r\nThursday:\r\nFriday:\r\nSaturday:\r\nSunday:\r\n\r\n";
assertEquals(expectedOutput, outContent.toString());
"Monday:" +
"Busy 07:00 - 21:00" +
"Tuesday:" +
"Wednesday:" +
"Thursday:" +
"Friday:" +
"Saturday:" +
"Sunday:";
assertEquals(expectedOutput, outContentEdit);
}
@Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment