Class AllPduRoundTripTest
java.lang.Object
edu.nps.moves.dis7.test.AllPduRoundTripTest
This is a test class (which can also be run through its main() method) which tests round-tripping of pdus, i.e.,
creating a pdu instance in java, serializing it and sending over the network as a stream of bytes, at the same time
reading them back from the net. It also uses the pdu logger in the Player class to save the received pdus to disk.
Two tests for pdu equivalency are performed:
1. Sent vs. received
2. Sent vs. persisted
- Author:
- Mike Bailey, jmbailey@edu.nps.edu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Finishstatic void
Preparestatic void
Command-line invocation (CLI) of program, execution starts herevoid
setUp()
Setup initialization before each testvoid
tearDown()
Housekeeping after each testvoid
Check ability to sendPDU and receive each DIS PDU
-
Constructor Details
-
AllPduRoundTripTest
public AllPduRoundTripTest()default constructor
-
-
Method Details
-
beforeAllTests
@BeforeAll public static void beforeAllTests()Prepare -
afterAllTests
@AfterAll public static void afterAllTests()Finish -
setUp
@BeforeEach public void setUp()Setup initialization before each test -
tearDown
@AfterEach public void tearDown()Housekeeping after each test -
testRoundTripAllPdus
@Test public void testRoundTripAllPdus()Check ability to sendPDU and receive each DIS PDU -
main
Command-line invocation (CLI) of program, execution starts here- Parameters:
args
- command-line arguments
-