예제 #1
0
 @Test
 public void testGetIcon() {
   assertTrue(ErrorLevel.LOW.getIcon() instanceof Icon);
   assertTrue(ErrorLevel.MEDIUM.getIcon() instanceof Icon);
   assertTrue(ErrorLevel.HIGH.getIcon() instanceof Icon);
   assertTrue(ErrorLevel.FATAL.getIcon() instanceof Icon);
   assertTrue(ErrorLevel.UNKNOWN.getIcon() instanceof Icon);
 }
예제 #2
0
 @Test
 public void testToString() {
   assertTrue("Low".equalsIgnoreCase(ErrorLevel.LOW.toString()));
   assertTrue("Medium".equalsIgnoreCase(ErrorLevel.MEDIUM.toString()));
   assertTrue("High".equalsIgnoreCase(ErrorLevel.HIGH.toString()));
   assertTrue("Fatal".equalsIgnoreCase(ErrorLevel.FATAL.toString()));
   assertTrue("Unknown".equalsIgnoreCase(ErrorLevel.UNKNOWN.toString()));
 }
예제 #3
0
 @Test
 public void testMoreImportantHigh() {
   assertFalse(ErrorLevel.HIGH.moreImportant(ErrorLevel.MEDIUM));
   assertFalse(ErrorLevel.HIGH.moreImportant(ErrorLevel.HIGH));
   assertTrue(ErrorLevel.HIGH.moreImportant(ErrorLevel.FATAL));
   assertFalse(ErrorLevel.HIGH.moreImportant(ErrorLevel.LOW));
   assertFalse(ErrorLevel.HIGH.moreImportant(ErrorLevel.UNKNOWN));
   assertFalse(ErrorLevel.HIGH.moreImportant(null));
 }