예제 #1
0
 @Test
 public void shouldLeftAlignLogLevelInTenCharacterField() {
   listener.logMessage(SEVERE, "test message");
   verify(view).writeLogMessage(contains("SEVERE    "));
 }
예제 #2
0
 @Test
 public void shouldIncludeLogLevelInDisplayedMessage() {
   listener.logMessage(INFO, "test message");
   verify(view).writeLogMessage(contains("INFO"));
 }
예제 #3
0
 @Test
 public void shouldIncludeOtherLogLevelInDisplayedMessage() {
   listener.logMessage(WARNING, "test message");
   verify(view).writeLogMessage(contains("WARNING"));
 }
예제 #4
0
 @Test
 public void shouldDisplayMesageInView() {
   listener.logMessage(INFO, "test message");
   verify(view).writeLogMessage(contains("test message"));
 }