Пример #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 testMoreImportantFatal() {
   assertFalse(ErrorLevel.FATAL.moreImportant(ErrorLevel.MEDIUM));
   assertFalse(ErrorLevel.FATAL.moreImportant(ErrorLevel.HIGH));
   assertFalse(ErrorLevel.FATAL.moreImportant(ErrorLevel.FATAL));
   assertFalse(ErrorLevel.FATAL.moreImportant(ErrorLevel.LOW));
   assertFalse(ErrorLevel.FATAL.moreImportant(ErrorLevel.UNKNOWN));
   assertFalse(ErrorLevel.FATAL.moreImportant(null));
 }