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

renames and comments for clarity

parent 3468e7ce
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
package edu.nps.moves.dis7; package edu.nps.moves.dis7;
import edu.nps.moves.dis7.enumerations.VariableRecordType; import edu.nps.moves.dis7.enumerations.VariableRecordType;
import edu.nps.moves.dis7.pdus.CommentPdu;
import edu.nps.moves.dis7.pdus.Pdu; import edu.nps.moves.dis7.pdus.Pdu;
import edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface; import edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface;
import edu.nps.moves.dis7.utilities.PduFactory; import edu.nps.moves.dis7.utilities.PduFactory;
...@@ -74,7 +73,7 @@ public class CommentPdusTest ...@@ -74,7 +73,7 @@ public class CommentPdusTest
* @param newPdu PDU of interest */ * @param newPdu PDU of interest */
private void testOne(Pdu newPdu) private void testOne(Pdu newPdu)
{ {
sendPdu(newPdu); // will wait a while sendPdu(newPdu); // send to self, then wait a while, then return receivedPdu
assertTrue(receivedPdu != null, "No response from network receiver"); assertTrue(receivedPdu != null, "No response from network receiver");
String marshallMismatchMessage = String marshallMismatchMessage =
......
...@@ -94,10 +94,12 @@ abstract public class PduTest ...@@ -94,10 +94,12 @@ abstract public class PduTest
} }
/** /**
* Handler * Handler that passes PDU to DIS network interface for marshalling (serialization),
* which then sends IEEE Standard (binary) PDU to self, which is then read separately
* for unmarshalling (deserialization) further unit testing.
* @param createdPdu new PDU of interest * @param createdPdu new PDU of interest
*/ */
protected void sendPdu(Pdu createdPdu) protected void sendIeeeStandardPdu(Pdu createdPdu)
{ {
try try
{ {
...@@ -106,7 +108,7 @@ abstract public class PduTest ...@@ -106,7 +108,7 @@ abstract public class PduTest
} }
catch (InterruptedException ex) catch (InterruptedException ex)
{ {
System.err.println(this.getClass().getName() + ".sendPdu(Pdu createdPdu), error sending Multicast: " + ex.getLocalizedMessage()); System.err.println(this.getClass().getName() + ".sendIeeeStandardPdu(Pdu createdPdu), error sending Multicast: " + ex.getLocalizedMessage());
System.exit(1); System.exit(1);
} }
} }
...@@ -140,7 +142,7 @@ abstract public class PduTest ...@@ -140,7 +142,7 @@ abstract public class PduTest
{ {
String TEST_SUITE_WARNING = " (TODO note that test works standalone but mysteriously fails as part of project test suite)"; String TEST_SUITE_WARNING = " (TODO note that test works standalone but mysteriously fails as part of project test suite)";
sendPdu(createdPdu); // will wait a while, then return receivedPdu sendIeeeStandardPdu(createdPdu); // send to self, then wait a while, then return receivedPdu
assertTrue(receivedPdu != null, "No response from network receive after " + getThreadSleepInterval() + " msec" assertTrue(receivedPdu != null, "No response from network receive after " + getThreadSleepInterval() + " msec"
+ TEST_SUITE_WARNING); + TEST_SUITE_WARNING);
......
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