Search in sources :

Example 11 with ActionConfig

use of jodd.madvoc.ActionConfig in project jodd by oblac.

the class ActionsManagerTest method testActionPathMacros1.

@Test
public void testActionPathMacros1() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();
    ActionsManager actionsManager = webapp.getComponent(ActionsManager.class);
    actionsManager.register(FooAction.class, "one", new ActionDef("/${one}"));
    ActionConfig actionConfig = actionsManager.lookup("/foo", null);
    assertNotNull(actionConfig);
    actionConfig = actionsManager.lookup("/foo/boo", null);
    assertNull(actionConfig);
    actionConfig = actionsManager.lookup("/foo/boo/zoo", null);
    assertNull(actionConfig);
}
Also used : ActionConfig(jodd.madvoc.ActionConfig) WebApplication(jodd.madvoc.WebApplication) ActionDef(jodd.madvoc.ActionDef) Test(org.junit.Test)

Aggregations

ActionConfig (jodd.madvoc.ActionConfig)11 ActionDef (jodd.madvoc.ActionDef)7 WebApplication (jodd.madvoc.WebApplication)6 Test (org.junit.Test)6 ActionConfigSet (jodd.madvoc.ActionConfigSet)2 ActionRequest (jodd.madvoc.ActionRequest)2 AsyncContext (javax.servlet.AsyncContext)1 ServletContext (javax.servlet.ServletContext)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 HttpSession (javax.servlet.http.HttpSession)1 MadvocException (jodd.madvoc.MadvocException)1 ScopeData (jodd.madvoc.ScopeData)1 MadvocController (jodd.madvoc.component.MadvocController)1 RenderWith (jodd.madvoc.meta.RenderWith)1 ActionResult (jodd.madvoc.result.ActionResult)1 Result (jodd.madvoc.result.Result)1