Package org.mojavemvc.core

Examples of org.mojavemvc.core.MojaveRoute


    @Test
    public void handlesControllerAndAction_OnePathParam_AlreadyExists() {
       
        String pathInfo = "/cntrl/actn/123";
        when(router.route(pathInfo))
            .thenReturn(new MojaveRoute("cntrl", "actn", ":id"));
        paramMap.put("id", new String[]{"456"});
       
        RoutedRequest routed = newRouter(pathInfo).route();
       
        assertEquals("cntrl", routed.getController());
View Full Code Here


    @Test
    public void handlesControllerAndAction_OnePathParam_AnotherExists() {
       
        String pathInfo = "/cntrl/actn/123";
        when(router.route(pathInfo))
            .thenReturn(new MojaveRoute("cntrl", "actn", ":id"));
        paramMap.put("name", new String[]{"tom"});
       
        RoutedRequest routed = newRouter(pathInfo).route();
       
        assertEquals("cntrl", routed.getController());
View Full Code Here

TOP

Related Classes of org.mojavemvc.core.MojaveRoute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.