Package org.mojavemvc.core

Examples of org.mojavemvc.core.ActionSignature.methodName()


        assertEquals("doSomethingAfter", afterActionMethod.methodName());

        ActionSignature defaultActionSignature = db.getDefaultActionMethodFor(TestController.class);
        assertNotNull(defaultActionSignature);
        assertTrue(defaultActionSignature instanceof DefaultActionSignature);
        assertEquals("defaultAction", defaultActionSignature.methodName());

        ActionSignature afterConstructMethod = db.getAfterConstructMethodFor(TestController.class);
        assertNotNull(afterConstructMethod);
        assertEquals("init", afterConstructMethod.methodName());
View Full Code Here


        assertTrue(defaultActionSignature instanceof DefaultActionSignature);
        assertEquals("defaultAction", defaultActionSignature.methodName());

        ActionSignature afterConstructMethod = db.getAfterConstructMethodFor(TestController.class);
        assertNotNull(afterConstructMethod);
        assertEquals("init", afterConstructMethod.methodName());

        afterConstructMethod = db.getAfterConstructMethodFor(TestStartupController.class);
        assertNotNull(afterConstructMethod);
        assertEquals("init2", afterConstructMethod.methodName());
View Full Code Here

        assertNotNull(afterConstructMethod);
        assertEquals("init", afterConstructMethod.methodName());

        afterConstructMethod = db.getAfterConstructMethodFor(TestStartupController.class);
        assertNotNull(afterConstructMethod);
        assertEquals("init2", afterConstructMethod.methodName());

        Set<Class<?>> initControllers = db.getInitControllers();
        assertNotNull(initControllers);
        assertEquals(1, initControllers.size());
        assertEquals(TestStartupController.class, initControllers.iterator().next());
View Full Code Here

       
        assertEquals( TestChildClass.class, db.getControllerClass("child"));
        assertEquals( TestChildClass.class, db.getDefaultControllerClass( ));
       
        ActionSignature sig = db.getActionMethodSignature(TestChildClass.class, "test");
        assertEquals( "testAction", sig.methodName() );
       
        ActionSignature defaultActionMethod = db.getDefaultActionMethodFor(TestChildClass.class);
        assertNotNull( defaultActionMethod );
        assertEquals( "defaultAction", defaultActionMethod.methodName( ) );
       
View Full Code Here

        ActionSignature sig = db.getActionMethodSignature(TestChildClass.class, "test");
        assertEquals( "testAction", sig.methodName() );
       
        ActionSignature defaultActionMethod = db.getDefaultActionMethodFor(TestChildClass.class);
        assertNotNull( defaultActionMethod );
        assertEquals( "defaultAction", defaultActionMethod.methodName( ) );
       
        ActionSignature beforeActionMethod = db.getBeforeActionMethodFor(TestChildClass.class);
        assertNotNull( beforeActionMethod );
        assertEquals( "doSomethingBefore", beforeActionMethod.methodName( ) );
    }
View Full Code Here

        assertNotNull( defaultActionMethod );
        assertEquals( "defaultAction", defaultActionMethod.methodName( ) );
       
        ActionSignature beforeActionMethod = db.getBeforeActionMethodFor(TestChildClass.class);
        assertNotNull( beforeActionMethod );
        assertEquals( "doSomethingBefore", beforeActionMethod.methodName( ) );
    }
   
    @Test
    public void testInterceptorInheritance() {
   
View Full Code Here

        assertEquals(1, interceptors.size());
        assertEquals(ConcreteInterceptor.class, interceptors.get(0));

        ActionSignature beforeActionMethod = db.getBeforeActionMethodForInterceptor(ConcreteInterceptor.class);
        assertNotNull(beforeActionMethod);
        assertEquals("before", beforeActionMethod.methodName());
       
        assertEquals(1, rm.size());
        assertTrue(rm.contains(new MojaveRoute("interceptor4", "someAction", null)));
    }
View Full Code Here

        assertEquals(1, interceptors.size());
        assertEquals(Interceptor1.class, interceptors.get(0));

        ActionSignature beforeActionMethod = db.getBeforeActionMethodForInterceptor(Interceptor1.class);
        assertNotNull(beforeActionMethod);
        assertEquals("before", beforeActionMethod.methodName());

        ActionSignature afterActionMethod = db.getAfterActionMethodForInterceptor(Interceptor1.class);
        assertNotNull(afterActionMethod);
        assertEquals("after", afterActionMethod.methodName());
       
View Full Code Here

        assertNotNull(beforeActionMethod);
        assertEquals("before", beforeActionMethod.methodName());

        ActionSignature afterActionMethod = db.getAfterActionMethodForInterceptor(Interceptor1.class);
        assertNotNull(afterActionMethod);
        assertEquals("after", afterActionMethod.methodName());
       
        assertEquals(1, rm.size());
        assertTrue(rm.contains(new MojaveRoute("interceptor1", "someAction", null)));
    }
View Full Code Here

        assertEquals(Interceptor1.class, interceptors.get(0));
        assertEquals(Interceptor2.class, interceptors.get(1));

        ActionSignature beforeActionMethod = db.getBeforeActionMethodForInterceptor(Interceptor1.class);
        assertNotNull(beforeActionMethod);
        assertEquals("before", beforeActionMethod.methodName());

        beforeActionMethod = db.getBeforeActionMethodForInterceptor(Interceptor2.class);
        assertNotNull(beforeActionMethod);
        assertEquals("before2", beforeActionMethod.methodName());
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.