Search in sources :

Example 1 with HomeController

use of com.tvd12.ezyhttp.server.core.test.controller.HomeController in project ezyhttp by youngmonkeys.

the class RequestHandlerImplementerTest method test.

@Test
public void test() {
    RequestHandlerImplementer.setDebug(true);
    ControllerProxy homeController = new ControllerProxy(new HomeController());
    for (RequestHandlerMethod method : homeController.getRequestHandlerMethods()) {
        RequestHandlerImplementer implementer = new RequestHandlerImplementer(homeController, method);
        implementer.implement();
    }
}
Also used : RequestHandlerMethod(com.tvd12.ezyhttp.server.core.reflect.RequestHandlerMethod) HomeController(com.tvd12.ezyhttp.server.core.test.controller.HomeController) RequestHandlerImplementer(com.tvd12.ezyhttp.server.core.asm.RequestHandlerImplementer) ControllerProxy(com.tvd12.ezyhttp.server.core.reflect.ControllerProxy) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 2 with HomeController

use of com.tvd12.ezyhttp.server.core.test.controller.HomeController in project ezyhttp by youngmonkeys.

the class ControllerProxyTest method test.

@Test
public void test() {
    ControllerProxy home = new ControllerProxy(new HomeController());
    System.out.println(home);
}
Also used : HomeController(com.tvd12.ezyhttp.server.boot.test.controller.HomeController) ControllerProxy(com.tvd12.ezyhttp.server.core.reflect.ControllerProxy) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 3 with HomeController

use of com.tvd12.ezyhttp.server.core.test.controller.HomeController in project ezyhttp by youngmonkeys.

the class RequestHandlerImplementerTest method test.

@Test
public void test() {
    RequestHandlerImplementer.setDebug(true);
    ControllerProxy homeController = new ControllerProxy(new HomeController());
    for (RequestHandlerMethod method : homeController.getRequestHandlerMethods()) {
        RequestHandlerImplementer implementer = new RequestHandlerImplementer(homeController, method);
        implementer.implement();
    }
}
Also used : RequestHandlerMethod(com.tvd12.ezyhttp.server.core.reflect.RequestHandlerMethod) HomeController(com.tvd12.ezyhttp.server.boot.test.controller.HomeController) RequestHandlerImplementer(com.tvd12.ezyhttp.server.core.asm.RequestHandlerImplementer) ControllerProxy(com.tvd12.ezyhttp.server.core.reflect.ControllerProxy) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 4 with HomeController

use of com.tvd12.ezyhttp.server.core.test.controller.HomeController in project ezyhttp by youngmonkeys.

the class RequestHandlerImplementerTest method test.

@Test
public void test() {
    RequestHandlerImplementer.setDebug(true);
    ControllerProxy homeController = new ControllerProxy(new HomeController());
    for (RequestHandlerMethod method : homeController.getRequestHandlerMethods()) {
        RequestHandlerImplementer implementer = new RequestHandlerImplementer(homeController, method);
        implementer.implement();
    }
}
Also used : RequestHandlerMethod(com.tvd12.ezyhttp.server.core.reflect.RequestHandlerMethod) HomeController(com.tvd12.ezyhttp.server.jetty.test.controller.HomeController) RequestHandlerImplementer(com.tvd12.ezyhttp.server.core.asm.RequestHandlerImplementer) ControllerProxy(com.tvd12.ezyhttp.server.core.reflect.ControllerProxy) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Example 5 with HomeController

use of com.tvd12.ezyhttp.server.core.test.controller.HomeController in project ezyhttp by youngmonkeys.

the class ControllerProxyTest method test.

@Test
public void test() {
    // given
    HomeController homeController = new HomeController();
    ControllerProxy sut = new ControllerProxy(homeController);
    // when
    List<ExceptionHandlerMethod> exceptionHandlerMethods = sut.getExceptionHandlerMethods();
    // then
    Asserts.assertEquals(2, exceptionHandlerMethods.size());
    Asserts.assertFalse(sut.isPayment());
    Asserts.assertNull(sut.getFeature());
    System.out.println(sut);
}
Also used : HomeController(com.tvd12.ezyhttp.server.core.test.controller.HomeController) ControllerProxy(com.tvd12.ezyhttp.server.core.reflect.ControllerProxy) ExceptionHandlerMethod(com.tvd12.ezyhttp.server.core.reflect.ExceptionHandlerMethod) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

ControllerProxy (com.tvd12.ezyhttp.server.core.reflect.ControllerProxy)6 BaseTest (com.tvd12.test.base.BaseTest)6 Test (org.testng.annotations.Test)6 RequestHandlerImplementer (com.tvd12.ezyhttp.server.core.asm.RequestHandlerImplementer)3 RequestHandlerMethod (com.tvd12.ezyhttp.server.core.reflect.RequestHandlerMethod)3 HomeController (com.tvd12.ezyhttp.server.boot.test.controller.HomeController)2 HomeController (com.tvd12.ezyhttp.server.core.test.controller.HomeController)2 HomeController (com.tvd12.ezyhttp.server.jetty.test.controller.HomeController)2 HomeController (com.tvd12.example.reactive.HomeController)1 RxHomeController (com.tvd12.example.reactive.RxHomeController)1 EzyBeanContext (com.tvd12.ezyfox.bean.EzyBeanContext)1 ExceptionHandlerMethod (com.tvd12.ezyhttp.server.core.reflect.ExceptionHandlerMethod)1