use of com.tvd12.ezyfoxserver.command.EzySendResponse in project ezyfox-server by youngmonkeys.
the class EzySimpleServerContextTest method sendNowTest.
@Test
public void sendNowTest() {
// given
EzyResponse response = mock(EzyResponse.class);
EzySession recipient = mock(EzySession.class);
EzySendResponse sendResponse = mock(EzySendResponse.class);
doNothing().when(sendResponse).execute(response, recipient, false, true, EzyTransportType.TCP);
EzySimpleServerContext sut = new EzySimpleServerContext();
FieldUtil.setFieldValue(sut, "sendResponse", sendResponse);
// when
sut.sendNow(response, recipient);
// then
verify(sendResponse, times(1)).execute(response, recipient, false, true, EzyTransportType.TCP);
}
Aggregations