use of com.tvd12.ezyfoxserver.exception.EzyRequestHandleException.requestHandleException 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;
}
use of com.tvd12.ezyfoxserver.exception.EzyRequestHandleException.requestHandleException in project ezyfox-server by youngmonkeys.
the class EzyRequestHandleExceptionTest method test.
@Test(expectedExceptions = { EzyRequestHandleException.class })
public void test() {
EzySession session = Mockito.mock(EzySession.class);
Mockito.when(session.getName()).thenReturn("hello world");
throw EzyRequestHandleException.requestHandleException(session, EzyCommand.LOGIN, new Object(), new Exception());
}
Aggregations