@Test public void testCanRegisterAction() throws Exception { PluginFactory.RegisterAction("myAction", PercentUpdate.class); Action action = PluginFactory.getAction("myAction", "2"); assertEquals(action.getClass(), PercentUpdate.class); }
@Test public void testGetAction() throws Exception { Action action = PluginFactory.getAction("percentAward", "2"); assertEquals(action.getClass(), PercentUpdate.class); action = PluginFactory.getAction("award", "5.00"); assertEquals(action.getClass(), SimpleUpdate.class); }