@Test public void testInject_mnemonic() { initializeInjecter(); injecter.inject(); Object mnemonicValue = action.getValue(Action.MNEMONIC_KEY); assertEquals(new Integer(KeyEvent.VK_A), mnemonicValue); }
@Test public void testInject_accelerator() { initializeInjecter(); injecter.inject(); Object keystrokeValue = action.getValue(Action.ACCELERATOR_KEY); assertEquals(KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.CTRL_DOWN_MASK), keystrokeValue); }
@Test public void testInject_longDescription() { initializeInjecter(); injecter.inject(); Object longDescValue = action.getValue(Action.LONG_DESCRIPTION); assertEquals("A very long description of action1", longDescValue); }
@Test public void testInject_shortDescription() { initializeInjecter(); injecter.inject(); Object shortDescValue = action.getValue(Action.SHORT_DESCRIPTION); assertEquals("Short description of action1", shortDescValue); }
@Test public void testInject_Name() { initializeInjecter(); injecter.inject(); Object nameValue = action.getValue(Action.NAME); assertEquals("Name1", nameValue); }
@Test public void testInject_largeIcon() { initializeInjecter(); injecter.inject(); Object largeIconValue = action.getValue(Action.LARGE_ICON_KEY); assertNotNull(largeIconValue); assertTrue(Icon.class.isAssignableFrom(largeIconValue.getClass())); }
@Test public void testInject_smallIcon() { initializeInjecter(); injecter.inject(); Object smallIconValue = action.getValue(Action.SMALL_ICON); assertNotNull(smallIconValue); assertTrue(Icon.class.isAssignableFrom(smallIconValue.getClass())); }