Package ninja

Examples of ninja.RouterImpl.compileRoutes()


        NinjaPropertiesImpl ninjaProperties = new NinjaPropertiesImpl(
                NinjaMode.test);
        RouterImpl router = new RouterImpl(injector, ninjaProperties);
        Routes routes = new Routes(ninjaProperties);
        routes.init(router);
        router.compileRoutes();

        Route route0 = router.getRoutes().get(0);
        Assert.assertThat(route0.getUri(),
                CoreMatchers.equalTo("/base/middle/app/get"));
View Full Code Here


        NinjaPropertiesImpl ninjaProperties = new NinjaPropertiesImpl(
                NinjaMode.test);
        RouterImpl router = new RouterImpl(injector, ninjaProperties);
        Routes routes = new Routes(ninjaProperties);
        routes.init(router);
        router.compileRoutes();

        String route = router.getReverseRoute(ApplicationController.class,
                "testKeyedRoute");

        Assert.assertNull(route);
View Full Code Here

                NinjaMode.test);
        ninjaProperties.setProperty("testkey", "true");
        RouterImpl router = new RouterImpl(injector, ninjaProperties);
        Routes routes = new Routes(ninjaProperties);
        routes.init(router);
        router.compileRoutes();

        String route = router.getReverseRoute(ApplicationController.class,
                "testKeyedRoute");

        Assert.assertThat(route,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.