diff --git a/test/edu/nps/moves/dis7/CommentPdusTest.java b/test/edu/nps/moves/dis7/CommentPdusTest.java index c25fa8e6bba8d2982423c100c35b6451e0e5341a..67e7fcabe5e180cf658bd0a3265ef95b37578415 100644 --- a/test/edu/nps/moves/dis7/CommentPdusTest.java +++ b/test/edu/nps/moves/dis7/CommentPdusTest.java @@ -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 } diff --git a/test/edu/nps/moves/dis7/EntityStatePduTest.java b/test/edu/nps/moves/dis7/EntityStatePduTest.java index d245f8f466278f0d1b1169866252e3b697d49104..f86937e2804ea050d9017d9e74689f4ed9995499 100644 --- a/test/edu/nps/moves/dis7/EntityStatePduTest.java +++ b/test/edu/nps/moves/dis7/EntityStatePduTest.java @@ -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 }