コード例 #1
0
  @Test
  public void testCanRegisterAction() throws Exception {

    PluginFactory.RegisterAction("myAction", PercentUpdate.class);

    Action action = PluginFactory.getAction("myAction", "2");
    assertEquals(action.getClass(), PercentUpdate.class);
  }
コード例 #2
0
  @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);
  }