/** * Test of the method <code>getColor(String)</code>. * * @throws Exception handled by JUnit */ public void testGetColor() throws Exception { lnf.initialize(); assertNotNull(lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND)); assertNull(lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_FONT)); assertNull(lnf.getColor("dummy")); }
/** * Test of the method <code>setTheme()</code>. * * @throws Exception handled by JUnit */ public void testSetTheme() throws Exception { final Color color1 = lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND); assertNotNull(color1); lnf.setTheme(new DummyTheme()); lnf.initialize(); assertFalse(color1.isDisposed()); final Color color2 = lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND); assertNull(color2); }
/** * Test of the method <code>initialize()</code>. * * @throws Exception handled by JUnit */ public void testInitialize() throws Exception { lnf.uninitialize(); assertNull(lnf.getRenderer(LnfKeyConstants.SUB_MODULE_VIEW_BORDER_RENDERER)); assertNull(lnf.getFont(LnfKeyConstants.EMBEDDED_TITLEBAR_FONT)); assertNull(lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND)); lnf.initialize(); assertNotNull(lnf.getFont(LnfKeyConstants.EMBEDDED_TITLEBAR_FONT)); assertNotNull(lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND)); }
/** * Test of the method <code>uninitialize()</code>. * * @throws Exception handled by JUnit */ public void testUninitialize() throws Exception { final Color color = lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND); assertNotNull(color); final Font font = lnf.getFont(LnfKeyConstants.EMBEDDED_TITLEBAR_FONT); assertNotNull(font); lnf.uninitialize(); assertFalse(font.isDisposed()); assertNull(lnf.getFont(LnfKeyConstants.EMBEDDED_TITLEBAR_FONT)); assertFalse(color.isDisposed()); assertNull(lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND)); assertNotSame( color, lnf.getColor(LnfKeyConstants.EMBEDDED_TITLEBAR_ACTIVE_FOREGROUND)); // TODO Could be removed }