public class SyncMessageReaderTest
extends java.lang.Object
SyncMessageReader.| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
errMsgPacket |
private static byte[] |
okMsgPacket |
private SyncMessageReader |
reader |
| Constructor and Description |
|---|
SyncMessageReaderTest() |
| Modifier and Type | Method and Description |
|---|---|
private static byte[] |
serializeMessage(com.google.protobuf.GeneratedMessageV3 msg,
int type)
Serialize a message for testing.
|
void |
testMappingTables()
Verification test to help prevent bugs in the typecode/class/parser mapping tables.
|
void |
testNextMessageClass() |
void |
testReadKnownMessageType() |
void |
testReadWrongMessageType() |
void |
testSeveralMessages()
This is a 'mini'-stress test that encompasses the check of clearHeader() being called correctly.
|
void |
testUnexpectedError() |
private SyncMessageReader reader
private static final byte[] okMsgPacket
private static final byte[] errMsgPacket
private static byte[] serializeMessage(com.google.protobuf.GeneratedMessageV3 msg,
int type)
msg - type - @Test
public void testNextMessageClass()
throws java.io.IOException
java.io.IOException@Test public void testReadKnownMessageType()
@Test public void testReadWrongMessageType()
@Test public void testUnexpectedError()
@Test
public void testSeveralMessages()
throws java.io.IOException
java.io.IOException@Test
public void testMappingTables()
throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException