@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); }
@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())); }
@Test public void testMoreImportantMedium() { assertFalse(ErrorLevel.MEDIUM.moreImportant(ErrorLevel.MEDIUM)); assertTrue(ErrorLevel.MEDIUM.moreImportant(ErrorLevel.HIGH)); assertTrue(ErrorLevel.MEDIUM.moreImportant(ErrorLevel.FATAL)); assertFalse(ErrorLevel.MEDIUM.moreImportant(ErrorLevel.LOW)); assertFalse(ErrorLevel.MEDIUM.moreImportant(ErrorLevel.UNKNOWN)); assertFalse(ErrorLevel.MEDIUM.moreImportant(null)); }