public class OioClientConnectionIT extends Object
OioClientConnection works as expected.| Constructor and Description |
|---|
OioClientConnectionIT() |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Closes the connection after the test.
|
void |
setUpClassToTestAndDependencies()
Sets up the class to test and its dependencies.
|
void |
shouldBeAbleToReadBytes()
The connection should be able to read
Bytes over the network. |
void |
shouldBeAbleToReadDoubles()
The connection should be able to read
Doubles over the network. |
void |
shouldBeAbleToReadIntegers()
The connection should be able to read
Integers over the network. |
void |
shouldBeAbleToReadLongss()
The connection should be able to read
Longs over the network. |
void |
shouldBeAbleToReadUtf8Strings()
The connection should be able to length prepended UTF-8
Strings over the network. |
void |
shouldBeAbleToWriteBytes()
The connection should be able to write
Bytes to the network. |
void |
shouldBeAbleToWriteDoubles()
The connection should be able to write
Doubles to the network. |
void |
shouldBeAbleToWriteIntegers()
The connection should be able to write
Integers to the network. |
void |
shouldBeAbleToWriteLongs()
The connection should be able to write
Longs to the network. |
void |
shouldBufferDataToSendAsLongAsDataIsAvailableForReadAndBufferIsNotFull()
As long as there are more bytes available to read, the connection should buffer the data to send.
|
void |
shouldSendBufferedDataWhenBufferIsFullEvenIfThereIsMoreToRead()
When the buffer is full it should be send, even if there is more to read.
|
void |
shouldThrowANormalCloseExceptionWhenTheClientClosedTheConnection()
When the client closed the connection, the next read or write should result in a
NormalCloseException. |
public void setUpClassToTestAndDependencies()
throws IOException
IOException - when the test cannot be executed because of network errors.public void shouldThrowANormalCloseExceptionWhenTheClientClosedTheConnection()
throws Exception
NormalCloseException.Exception - not expected to leave the test.public void shouldBeAbleToReadBytes()
throws Exception
Bytes over the network.Exception - not expected to leave the test.public void shouldBeAbleToReadIntegers()
throws Exception
Integers over the network.Exception - not expected to leave the test.public void shouldBeAbleToReadLongss()
throws Exception
Longs over the network.Exception - not expected to leave the test.public void shouldBeAbleToReadDoubles()
throws Exception
Doubles over the network.Exception - not expected to leave the test.public void shouldBeAbleToReadUtf8Strings()
throws Exception
Strings over the network.Exception - not expected to leave the test.public void shouldBeAbleToWriteBytes()
throws Exception
Bytes to the network.Exception - not expected to leave the test.public void shouldBeAbleToWriteIntegers()
throws Exception
Integers to the network.Exception - not expected to leave the test.public void shouldBeAbleToWriteLongs()
throws Exception
Longs to the network.Exception - not expected to leave the test.public void shouldBeAbleToWriteDoubles()
throws Exception
Doubles to the network.Exception - not expected to leave the test.public void shouldBufferDataToSendAsLongAsDataIsAvailableForReadAndBufferIsNotFull()
throws Exception
The buffer whole buffer should be send on write operations when there are no more bytes to read.
Exception - not expected to leave the test.public void shouldSendBufferedDataWhenBufferIsFullEvenIfThereIsMoreToRead()
throws Exception
Exception - not expected to leave the test.public void disconnect()
throws IOException
IOException - when closing the connection failed due to network errors.Copyright © 2016. All rights reserved.