public void testActionPathMacros3() {
WebApplication webapp = new WebApplication(true);
webapp.registerMadvocComponents();
ActionsManager actionsManager = webapp.getComponent(ActionsManager.class);
actionsManager.register(FooAction.class, "one", new ActionDef("/yyy-${one}"));
actionsManager.register(FooAction.class, "two", new ActionDef("/xxx-${two}"));
assertEquals(2, actionsManager.getActionsCount());
ActionConfig actionConfig = actionsManager.lookup("/foo", null);
assertNull(actionConfig);
actionConfig = actionsManager.lookup("/yyy-111", null);
assertEquals("one", actionConfig.actionClassMethod.getName());
actionConfig = actionsManager.lookup("/xxx-222", null);
assertEquals("two", actionConfig.actionClassMethod.getName());
try {
actionsManager.register(FooAction.class, "two", new ActionDef("/xxx-${two}"));
Assert.fail();
} catch (Exception ex) {
// ignore
}
}