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