diff --git a/test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java b/test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java index 1b624035375783a99903fb12af5ac6b2a4ce2fdb..e39ad8a28b4875aa8612ac41ff8284607cd0e0fd 100644 --- a/test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java @@ -3,19 +3,6 @@ * This work is provided under a BSD open-source license, see project license.html and license.txt */ package edu.nps.moves.dis7.test; - -/** - * 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 - * @version $Id$ - */ import edu.nps.moves.dis7.enumerations.Country; import edu.nps.moves.dis7.pdus.Pdu; import edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface; @@ -30,6 +17,19 @@ import java.util.concurrent.Semaphore; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; +/** + * 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 + * @version $Id$ + */ + @DisplayName("All Pdu Round Trip Test") public class AllPduRoundTripTest { diff --git a/test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java b/test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java index d7dd79acb573f5ae5ab343cbde415c48c88d00c5..3d8b0dfa8034e0d5ee3f49d089f996e606de5c80 100644 --- a/test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java @@ -17,6 +17,10 @@ import edu.nps.moves.dis7.utilities.PduFactory; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertTrue; +/** + * Unit tests for satisfactory handling of various necessary bit fields, supporting each data type. + * @author Don McGregor + */ @DisplayName("Bit Field Round TripTest") public class BitFieldRoundTripTest { diff --git a/test/edu/nps/moves/dis7/test/CommentPdusTest.java b/test/edu/nps/moves/dis7/test/CommentPdusTest.java index d464684e9c63c943653473b1829cdf420fb3299a..d1ec2dc2abd2b66af591ebb6de5064e7bd649629 100644 --- a/test/edu/nps/moves/dis7/test/CommentPdusTest.java +++ b/test/edu/nps/moves/dis7/test/CommentPdusTest.java @@ -11,6 +11,10 @@ import edu.nps.moves.dis7.utilities.PduFactory; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; +/** + * Unit testing for CommentPdus, which can serve as a free-form holder for any kind of narrative information or simulation data. + * @author brutzman + */ @DisplayName("Comment Pdus Test") public class CommentPdusTest { diff --git a/test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java b/test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java index 4e508e526ed6a7edb73b076f95635172f94a3765..e474417050f7c0a7b75fd28c7d2e87ae7e54bedf 100644 --- a/test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java +++ b/test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java @@ -9,6 +9,8 @@ import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertNull; /** + * Manually constructed tests for many object types. + * TODO consider automated production. * CreateAllObjectTypes created on May 20, 2019 MOVES Institute Naval Postgraduate School, Monterey, CA, USA www.nps.edu * * @author Mike Bailey, jmbailey@edu.nps.edu diff --git a/test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java b/test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java index 4141da8e8be491c81d1b107173faddf0e3cb032a..8b47525ec922561fe879d700aa6874f7836c9cb1 100644 --- a/test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java +++ b/test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java @@ -81,13 +81,17 @@ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.util.HashSet; import java.util.Set; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.AfterEach; +import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +/** + * Unit tests for satisfactory creation of all PDU objects. + * @author brutzman + */ public class CreateAllPduTypesTest { public CreateAllPduTypesTest() diff --git a/test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java b/test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java index 44970d6e9944ddeffbee63f4b9918d4035e2e4ea..2cb1a8bbaac77bd9f1a1ae4bfb1613435e54cfb8 100644 --- a/test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java @@ -14,6 +14,10 @@ import edu.nps.moves.dis7.utilities.PduFactory; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertTrue; +/** Unit tests for DataQuery PDU fields and values. + * + * @author brutzman + */ @DisplayName("Data Query Pdu Round Test") public class DataQueryPduRoundTripTest { diff --git a/test/edu/nps/moves/dis7/test/DetonationPduTest.java b/test/edu/nps/moves/dis7/test/DetonationPduTest.java index 4f779c338150e1400397ce353abf6440023d3aca..51c9a5b0dbea6e7dfc1f8071cd845a29cd0b3de0 100644 --- a/test/edu/nps/moves/dis7/test/DetonationPduTest.java +++ b/test/edu/nps/moves/dis7/test/DetonationPduTest.java @@ -41,7 +41,7 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; /** - * + * Unit tests for Detonation PDU fields and values. * @author <a href="mailto:tdnorbra@nps.edu?subject=edu.nps.moves.dis7.DetonationPduTest">Terry Norbraten, NPS MOVES</a> */ @DisplayName("Detonation Pdu Test") diff --git a/test/edu/nps/moves/dis7/test/EntityStatePduTest.java b/test/edu/nps/moves/dis7/test/EntityStatePduTest.java index dfa61f78c4c9270e15e6962fd289976d3cf13571..859eee84f5cff4505697d3a8bd07407b893db6e9 100644 --- a/test/edu/nps/moves/dis7/test/EntityStatePduTest.java +++ b/test/edu/nps/moves/dis7/test/EntityStatePduTest.java @@ -6,7 +6,6 @@ package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.Country; import edu.nps.moves.dis7.enumerations.EntityKind; -import edu.nps.moves.dis7.utilities.PduFactory; import edu.nps.moves.dis7.enumerations.PlatformDomain; import edu.nps.moves.dis7.pdus.Domain; import edu.nps.moves.dis7.pdus.EntityID; @@ -14,9 +13,13 @@ import edu.nps.moves.dis7.pdus.EntityMarking; import edu.nps.moves.dis7.pdus.EntityStatePdu; import edu.nps.moves.dis7.pdus.EntityType; import edu.nps.moves.dis7.pdus.Pdu; +import edu.nps.moves.dis7.utilities.PduFactory; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; +/** + * Unit tests for satisfactory handling of Entity State PDU (ESPDU) fields and values. + */ @DisplayName("Entity State Pdu Test") public class EntityStatePduTest extends PduTest { diff --git a/test/edu/nps/moves/dis7/test/FirePduTest.java b/test/edu/nps/moves/dis7/test/FirePduTest.java index 7899ca06eaf28bfc27355ee230e8d727a3a926ca..408ef61ead08cfcdf4b1695f0b58ca78460675b0 100644 --- a/test/edu/nps/moves/dis7/test/FirePduTest.java +++ b/test/edu/nps/moves/dis7/test/FirePduTest.java @@ -4,12 +4,15 @@ */ package edu.nps.moves.dis7.test; -import edu.nps.moves.dis7.utilities.PduFactory; import edu.nps.moves.dis7.pdus.FirePdu; import edu.nps.moves.dis7.pdus.Pdu; +import edu.nps.moves.dis7.utilities.PduFactory; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; +/** + * Unit tests for satisfactory handling of Fire PDU fields and values. + */ @DisplayName("Fire Pdu Test") public class FirePduTest extends PduTest { diff --git a/test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java b/test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java index e3cfd3afc050efc1687664066849e2597c9525c3..2863055b1bd7b0971bb9d8a82f2dc42c97c2c3f1 100644 --- a/test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java @@ -14,6 +14,9 @@ import edu.nps.moves.dis7.utilities.PduFactory; import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertTrue; +/** + * Unit tests for satisfactory handling of FixedDatum and VariableRecordType fields and values. + */ @DisplayName("Fixed and Variable Datum Round Trip Test") public class FixedAndVariableDatumRoundTripTest { diff --git a/test/edu/nps/moves/dis7/test/MarshalEnumsTest.java b/test/edu/nps/moves/dis7/test/MarshalEnumsTest.java index 676f61aa2c440b1cf76bd4c8d505008932842eba..b81871a92eddd3d2bb6f127253099c37a74776ce 100644 --- a/test/edu/nps/moves/dis7/test/MarshalEnumsTest.java +++ b/test/edu/nps/moves/dis7/test/MarshalEnumsTest.java @@ -6,15 +6,15 @@ package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.*; import edu.nps.moves.dis7.pdus.DisBitSet; - import java.lang.reflect.Method; - import java.nio.ByteBuffer; - import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +/** + * Unit tests for marshalling enumeration fields and values. + */ @DisplayName("Marshal Enums Test") public class MarshalEnumsTest { diff --git a/test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java b/test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java index 9f1c92c0250b13e2f73e5a9e8cf3999a4d4b6c38..e88de9a9e030975861f56b5bf5c980b51ecf9983 100644 --- a/test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java +++ b/test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java @@ -11,8 +11,8 @@ import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.*; /** - * NullFieldsMarshallTest created on May 20, 2019 MOVES Institute Naval Postgraduate School, Monterey, CA, USA www.nps.edu - * + * Unit tests for satisfactory handling of null fields and values when marshalling object instances. + * * @author Mike Bailey, jmbailey@edu.nps.edu * @version $Id$ */ diff --git a/test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java b/test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java index 50b1c7b5a47b320a3614ee22010a0ee955522ba8..ebff8149c70fb16adc7eaefcd0c7e6af544c64cc 100644 --- a/test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java +++ b/test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java @@ -12,6 +12,9 @@ import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +/** + * Unit tests for satisfactory handling of typed fields and values when marshalling object instances. + */ @DisplayName("Object Type Marshal Test") public class ObjectTypeMarshallTest { diff --git a/test/edu/nps/moves/dis7/test/PduFactoryTest.java b/test/edu/nps/moves/dis7/test/PduFactoryTest.java index 25bde1cbce919bd774fcb602f3a8df722f8212d9..2bf7fa7eb85a940ef979b03b10a59307dd319ef6 100644 --- a/test/edu/nps/moves/dis7/test/PduFactoryTest.java +++ b/test/edu/nps/moves/dis7/test/PduFactoryTest.java @@ -10,7 +10,8 @@ import org.junit.jupiter.api.*; import static org.junit.jupiter.api.Assertions.assertNull; /** - * + * Unit tests for satisfactory factory creation of each PDU class. + * * @author Mike Bailey, jmbailey@edu.nps.edu * @version $Id$ */ diff --git a/test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java b/test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java index 4bc745edfd9565f1e6b059127e7ab5bfe6d401f8..93e1548778e43df73fab2471bb8ae51f80255c5b 100644 --- a/test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java +++ b/test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java @@ -14,12 +14,12 @@ import java.nio.file.Path; import java.nio.file.StandardCopyOption; import java.util.concurrent.Semaphore; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** - * + * Unit tests for satisfactory filtering and creation of X3D interpolator values from a series of ESPDU track points. * @author <a href="mailto:tdnorbra@nps.edu?subject=edu.nps.moves.dis7.X3dInterpolatorsTest">Terry Norbraten, NPS MOVES</a> */ public class X3dInterpolatorsTest {