use of com.tvd12.ezyfoxserver.socket.EzyNonBlockingRequestQueue in project ezyfox-server by youngmonkeys.
the class EzyNonBlockingPacketQueueTest method clearTest.
@Test
public void clearTest() {
// given
EzyNonBlockingRequestQueue sut = new EzyNonBlockingRequestQueue();
EzySocketRequest socketRequest = mock(EzySocketRequest.class);
sut.add(socketRequest);
// when
sut.clear();
// then
Asserts.assertTrue(sut.isEmpty());
}
use of com.tvd12.ezyfoxserver.socket.EzyNonBlockingRequestQueue in project ezyfox-server by youngmonkeys.
the class EzyNonBlockingPacketQueueTest method isFullTest.
@Test
public void isFullTest() {
// given
EzyNonBlockingRequestQueue sut = new EzyNonBlockingRequestQueue(0);
EzySocketRequest socketRequest = mock(EzySocketRequest.class);
// when
boolean result = sut.add(socketRequest);
// then
Asserts.assertTrue(sut.isFull());
Asserts.assertFalse(result);
}
Aggregations