Package org.mojavemvc.core

Examples of org.mojavemvc.core.MappedControllerDatabase


    public void testParamPathController_Invalid4() {
       
        try {
            Set<Class<?>> controllerClasses = new HashSet<Class<?>>();
            controllerClasses.add(TestParamPathController_Invalid4.class);
            new MappedControllerDatabase(controllerClasses, new FakeRouteMap(),
                    new HashMap<String, EntityMarshaller>());
            fail("should have thrown exception");
        } catch (Exception e) {
            if (!(e instanceof ConfigurationException)) {
                fail("wrong exception type");
View Full Code Here


    public void testParamPathController_Invalid5() {
       
        try {
            Set<Class<?>> controllerClasses = new HashSet<Class<?>>();
            controllerClasses.add(TestParamPathController_Invalid5.class);
            new MappedControllerDatabase(controllerClasses, new FakeRouteMap(),
                    new HashMap<String, EntityMarshaller>());
            fail("should have thrown exception");
        } catch (Exception e) {
            if (!(e instanceof ConfigurationException)) {
                fail("wrong exception type");
View Full Code Here

    public void testParamPathAndHttpMethodController() {
       
        Set<Class<?>> controllerClasses = new HashSet<Class<?>>();
        controllerClasses.add(TestParamPathAndHttpMethodController.class);
        FakeRouteMap rm = new FakeRouteMap();
        ControllerDatabase db = new MappedControllerDatabase(controllerClasses, rm,
                new HashMap<String, EntityMarshaller>());
       
        assertEquals(TestParamPathAndHttpMethodController.class, db.getControllerClass("param-and-http"));
        assertEquals(2, rm.size());
        assertTrue(rm.contains(new MojaveRoute("param-and-http", null, "client/all")));
        assertTrue(rm.contains(new MojaveRoute("param-and-http", null, "client/:id")));
    }
View Full Code Here

        result.signature = sig;
        return result;
    }
   
    private ControllerDatabase newControllerDatabase(Set<Class<?>> controllerClasses) {
        return new MappedControllerDatabase(controllerClasses, new TreeRouter(),
                new HashMap<String, EntityMarshaller>());
    }
View Full Code Here

TOP

Related Classes of org.mojavemvc.core.MappedControllerDatabase

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.