Search in sources :

Example 1 with EzyRequestHandleException

use of com.tvd12.ezyfoxserver.exception.EzyRequestHandleException in project ezyfox-server by youngmonkeys.

the class EzyRequestHandleExceptionTest method test2.

@Test
public void test2() {
    EzySession session = Mockito.mock(EzySession.class);
    Mockito.when(session.getName()).thenReturn("hello world");
    EzyRequestHandleException exception = EzyRequestHandleException.requestHandleException(session, EzyCommand.LOGIN, new Object(), new Exception());
    assert exception.getSession() == session;
    assert exception.getCommand() == EzyCommand.LOGIN;
    assert exception.getData() != null;
}
Also used : EzyRequestHandleException(com.tvd12.ezyfoxserver.exception.EzyRequestHandleException) EzySession(com.tvd12.ezyfoxserver.entity.EzySession) EzyRequestHandleException(com.tvd12.ezyfoxserver.exception.EzyRequestHandleException) BaseTest(com.tvd12.test.base.BaseTest) Test(org.testng.annotations.Test)

Aggregations

EzySession (com.tvd12.ezyfoxserver.entity.EzySession)1 EzyRequestHandleException (com.tvd12.ezyfoxserver.exception.EzyRequestHandleException)1 BaseTest (com.tvd12.test.base.BaseTest)1 Test (org.testng.annotations.Test)1