Skip to content
Snippets Groups Projects
Commit 1cadf2c9 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

include test for matching pdu getMarshalledSize()

parent 7c1846b9
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,12 @@ public class CommentPdusTest
{
sendPdu(newPdu); // will wait a while
assertTrue(receivedPdu != null, "No response from network receiver");
String marshallMismatchMessage =
"Marshalled size mismatch," +
"sent (" + newPdu.getMarshalledSize() + " bytes) and " +
"recieved (" + receivedPdu.getMarshalledSize() + " bytes)";
// https://stackoverflow.com/questions/20631621/cannot-find-symbol-assertequals/20631672
assertEquals(newPdu.getMarshalledSize(), receivedPdu.getMarshalledSize(), marshallMismatchMessage);
assertTrue(compare(newPdu,receivedPdu), "Comparison failed");
receivedPdu = null; // ensure cleared prior to next test
}
......
......@@ -82,10 +82,11 @@ public class EntityStatePduTest
{
sendPdu(newPdu); // will wait a while
assertTrue(receivedPdu != null, "No response from network receive");
assertTrue(compare(newPdu,receivedPdu), "Comparison failed");
assertEqual(newPdu.getMarshalledSize(),receivedPdu),getMarshalledSize(),"Marshalled size mismatch," +
assertEquals(newPdu.getMarshalledSize(),receivedPdu.getMarshalledSize(),
"Marshalled size mismatch," +
"sent (" + newPdu.getMarshalledSize() + " bytes) and " +
"recieved (" + receivedPdu.getMarshalledSize() + " bytes)");
assertTrue(compare(newPdu,receivedPdu), "Comparison failed");
receivedPdu = null; // ensure cleared prior to next test
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment