|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--org.exolab.jmscts.core.JMSTestCase | +--org.exolab.jmscts.core.AbstractConnectionFactoryTestCase | +--org.exolab.jmscts.core.AbstractConnectionTestCase | +--org.exolab.jmscts.core.AbstractSessionTestCase | +--org.exolab.jmscts.core.AbstractMessageTestCase | +--org.exolab.jmscts.test.message.bytes.BytesMessageTest
This class tests the BytesMessage
message type.
BytesMessage
,
AbstractMessageTestCase
Fields inherited from interface org.exolab.jmscts.test.message.util.MessageValues |
ALL_VALUES, BYTE_ARRAYS, CHARS |
Fields inherited from interface org.exolab.jmscts.test.message.util.PropertyValues |
BOOLEANS, BYTES, DOUBLES, FLOATS, INTS, LONGS, SHORTS, STRINGS |
Constructor Summary | |
BytesMessageTest(java.lang.String name)
Construct a new BytesMessageTest |
Method Summary | |
MessagePopulator |
getMessagePopulator()
Get the message populator. |
static junit.framework.Test |
suite()
Sets up the test suite |
void |
testInvalidObject()
Verifies that attempting to write an invalid object using the BytesMessage.writeObject() method throws MessageFormatException |
void |
testPartialReadBytes1()
Verifies that the BytesMessage.readBytes(byte[], int) method can be called multiple times passing a byte array less than the length of the byte stream, and that the result matches that expected. |
void |
testPartialReadBytes2()
Verifies that the BytesMessage.readBytes(byte[], int) method can be called multiple times passing a length parameter less than the length of the array, and that the result matches that expected. |
void |
testReadBytes()
Verifies the behaviour of the BytesMessage.readBytes(byte[]) method. |
void |
testReadBytesForEmptyStream1()
Verifies that the BytesMessage.readBytes(byte[]) method returns -1 to indicate end-of-stream, for an empty message body. |
void |
testReadBytesForEmptyStream2()
Verifies that the BytesMessage.readBytes(byte[], int) method returns -1 to indicate end-of-stream, for an empty message body. |
void |
testReadBytesIndexException()
Verifies that the BytesMessage.readBytes(byte[], int) method throws IndexOutOfBoundsException for invalid length parameters |
void |
testReadFailure()
Verifies that if a read method throws MessageFormatException or NumberFormatException, the current position of the read pointer is not be incremented, and that a subsequent read is capable of recovering from the exception by re-reading the data as a different type. NOTE: With the exception of the readUTF() method, it is difficult to conceive test cases for read methods. |
void |
testWriteObject()
Verfies that all objectified primitives can be written using the BytesMessage.writeObject() method |
Methods inherited from class org.exolab.jmscts.core.AbstractMessageTestCase |
getMessageTypes, shouldCreateMessage, startConnection |
Methods inherited from class org.exolab.jmscts.core.AbstractSessionTestCase |
getAckTypes |
Methods inherited from class org.exolab.jmscts.core.AbstractConnectionTestCase |
setClientID |
Methods inherited from class org.exolab.jmscts.core.AbstractConnectionFactoryTestCase |
getConnectionFactoryTypes |
Methods inherited from class org.exolab.jmscts.core.JMSTestCase |
getContext, getRequirements, setContext, share |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.exolab.jmscts.core.SessionTestCase |
getAckTypes |
Methods inherited from interface org.exolab.jmscts.core.ConnectionTestCase |
setClientID |
Methods inherited from interface org.exolab.jmscts.core.ConnectionFactoryTestCase |
getConnectionFactoryTypes |
Methods inherited from interface org.exolab.jmscts.core.JMSTest |
getContext, setContext, share |
Methods inherited from interface junit.framework.Test |
countTestCases, run |
Constructor Detail |
public BytesMessageTest(java.lang.String name)
BytesMessageTest
name
- the name of test caseMethod Detail |
public static junit.framework.Test suite()
JMSTestRunner
public MessagePopulator getMessagePopulator()
getMessagePopulator
in class AbstractMessageTestCase
public void testReadFailure() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testReadBytesForEmptyStream1() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testReadBytesForEmptyStream2() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testReadBytes() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testPartialReadBytes1() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testPartialReadBytes2() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testReadBytesIndexException() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testWriteObject() throws java.lang.Exception
java.lang.Exception
- for any errorpublic void testInvalidObject() throws java.lang.Exception
java.lang.Exception
- for any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |