@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 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)); }