|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamSessionTest
public class InBandBytestreamSessionTest
Test for InBandBytestreamSession.
Tests the basic behavior of an In-Band Bytestream session along with sending data encapsulated in IQ stanzas.
| Constructor Summary | |
|---|---|
InBandBytestreamSessionTest()
|
|
| Method Summary | |
|---|---|
void |
setup()
Initialize fields used in the tests. |
void |
shouldCloseBothStreamsIfSessionIsClosed()
If the session is closed the input stream and output stream should be closed as well. |
void |
shouldConfirmReceivedDataPacket()
Valid data packets should be confirmed. |
void |
shouldNotCloseBothStreamsIfInputStreamIsClosed()
If the output stream is closed the input stream should not be closed as well. |
void |
shouldNotCloseBothStreamsIfOutputStreamIsClosed()
If the input stream is closed the output stream should not be closed as well. |
void |
shouldNotDeadlockIfInputStreamIsClosed()
If the input stream is closed concurrently there should be no deadlock. |
void |
shouldReadAllReceivedData1()
Test the input stream read(byte[], int, int) method. |
void |
shouldReadAllReceivedData2()
Test the input stream read() method. |
void |
shouldReplyWithErrorIfAlreadyUsedSequenceIsReceived()
If the data packet has a sequence that is already used an 'unexpected-request' error should be returned. |
void |
shouldReplyWithErrorIfDataIsInvalid()
If the data packet contains invalid Base64 encoding an 'bad-request' error should be returned. |
void |
shouldSendCloseRequestIfInvalidSequenceReceived()
If a data packet is received out of order the session should be closed. |
void |
shouldSendDataCorrectly()
Test that the data is correctly chunked. |
void |
shouldSendNothingOnSuccessiveCallsToFlush()
Test successive calls to the output stream flush() method. |
void |
shouldSendThirtyDataPackets()
Test the output stream flush() method. |
void |
shouldSendThreeDataPackets1()
Test the output stream write(byte[]) method. |
void |
shouldSendThreeDataPackets2()
Test the output stream write(byte) method. |
void |
shouldSendThreeDataPackets3()
Test the output stream write(byte[], int, int) method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InBandBytestreamSessionTest()
| Method Detail |
|---|
public void setup()
public void shouldSendThreeDataPackets1()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldSendThreeDataPackets2()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldSendThreeDataPackets3()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldSendThirtyDataPackets()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldSendNothingOnSuccessiveCallsToFlush()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldSendDataCorrectly()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldNotCloseBothStreamsIfOutputStreamIsClosed()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldConfirmReceivedDataPacket()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldReplyWithErrorIfAlreadyUsedSequenceIsReceived()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldReplyWithErrorIfDataIsInvalid()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldSendCloseRequestIfInvalidSequenceReceived()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldReadAllReceivedData1()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldReadAllReceivedData2()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldNotCloseBothStreamsIfInputStreamIsClosed()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldCloseBothStreamsIfSessionIsClosed()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldNotDeadlockIfInputStreamIsClosed()
throws java.lang.Exception
java.lang.Exception - should not happen
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||