Search in sources :

Example 1 with EzyRequestAppController

use of com.tvd12.ezyfoxserver.controller.EzyRequestAppController in project ezyfox-server by youngmonkeys.

the class EzyRequestAppControllerTest method testHasNotAccessed.

@Test
public void testHasNotAccessed() {
    EzyArray data = EzyEntityArrays.newArray(1, EzyEntityArrays.newArray());
    EzyRequestAppController controller = new EzyRequestAppController();
    MyTestUser user = new MyTestUser();
    user.setName("dungtv1");
    user.addSession(session);
    EzySimpleRequestAppRequest request = new EzySimpleRequestAppRequest();
    request.deserializeParams(data);
    request.setUser(user);
    request.setSession(session);
    EzyServerContext ctx = newServerContext();
    controller.handle(ctx, request);
}
Also used : EzyRequestAppController(com.tvd12.ezyfoxserver.controller.EzyRequestAppController) MyTestUser(com.tvd12.ezyfoxserver.testing.MyTestUser) EzyServerContext(com.tvd12.ezyfoxserver.context.EzyServerContext) EzyArray(com.tvd12.ezyfox.entity.EzyArray) EzySimpleRequestAppRequest(com.tvd12.ezyfoxserver.request.EzySimpleRequestAppRequest) Test(org.testng.annotations.Test) BaseCoreContextTest(com.tvd12.ezyfoxserver.testing.BaseCoreContextTest)

Example 2 with EzyRequestAppController

use of com.tvd12.ezyfoxserver.controller.EzyRequestAppController in project ezyfox-server by youngmonkeys.

the class EzyRequestAppControllerTest method test.

@Test
public void test() {
    EzyArray data = EzyEntityArrays.newArray(1, EzyEntityArrays.newArray());
    EzyRequestAppController controller = new EzyRequestAppController();
    EzySimpleRequestAppRequest request = new EzySimpleRequestAppRequest();
    request.deserializeParams(data);
    request.setUser(user);
    request.setSession(session);
    EzyServerContext ctx = newServerContext();
    controller.handle(ctx, request);
}
Also used : EzyRequestAppController(com.tvd12.ezyfoxserver.controller.EzyRequestAppController) EzyServerContext(com.tvd12.ezyfoxserver.context.EzyServerContext) EzyArray(com.tvd12.ezyfox.entity.EzyArray) EzySimpleRequestAppRequest(com.tvd12.ezyfoxserver.request.EzySimpleRequestAppRequest) Test(org.testng.annotations.Test) BaseCoreContextTest(com.tvd12.ezyfoxserver.testing.BaseCoreContextTest)

Aggregations

EzyArray (com.tvd12.ezyfox.entity.EzyArray)2 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)2 EzyRequestAppController (com.tvd12.ezyfoxserver.controller.EzyRequestAppController)2 EzySimpleRequestAppRequest (com.tvd12.ezyfoxserver.request.EzySimpleRequestAppRequest)2 BaseCoreContextTest (com.tvd12.ezyfoxserver.testing.BaseCoreContextTest)2 Test (org.testng.annotations.Test)2 MyTestUser (com.tvd12.ezyfoxserver.testing.MyTestUser)1