From 2c72eac210631662bef58ace0f54bbc1e88dabeb Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Sun, 17 Oct 2021 11:36:39 -0700 Subject: [PATCH] refactor move test classes into dedicated test package --- .../dis7/{ => test}/AllPduRoundTripTest.java | 2 +- .../{ => test}/BitFieldRoundTripTest.java | 2 +- .../dis7/{ => test}/CommentPdusTest.java | 2 +- .../{ => test}/CreateAllObjectTypesTest.java | 2 +- .../{ => test}/CreateAllPduTypesTest.java | 2 +- .../{ => test}/DataQueryPduRoundTripTest.java | 2 +- .../dis7/{ => test}/DetonationPduTest.java | 2 +- .../dis7/{ => test}/EntityStatePduTest.java | 2 +- .../moves/dis7/{ => test}/FirePduTest.java | 2 +- .../FixedAndVariableDatumRoundTripTest.java | 2 +- .../dis7/{ => test}/MarshalEnumsTest.java | 2 +- .../NullFieldsEntityMarshallTest.java | 2 +- .../{ => test}/ObjectTypeMarshallTest.java | 2 +- .../moves/dis7/{ => test}/PduFactoryTest.java | 2 +- .../nps/moves/dis7/{ => test}/PduTest.java | 2 +- .../moves/dis7/{ => test}/SignalPdusTest.java | 2 +- .../dis7/{ => test}/X3dInterpolatorsTest.java | 2 +- .../edu/nps/moves/dis7/test/package-info.java | 40 +++++++++++++++++++ 18 files changed, 57 insertions(+), 17 deletions(-) rename test/edu/nps/moves/dis7/{ => test}/AllPduRoundTripTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/BitFieldRoundTripTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/CommentPdusTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/CreateAllObjectTypesTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/CreateAllPduTypesTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/DataQueryPduRoundTripTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/DetonationPduTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/EntityStatePduTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/FirePduTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/FixedAndVariableDatumRoundTripTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/MarshalEnumsTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/NullFieldsEntityMarshallTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/ObjectTypeMarshallTest.java (98%) rename test/edu/nps/moves/dis7/{ => test}/PduFactoryTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/PduTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/SignalPdusTest.java (99%) rename test/edu/nps/moves/dis7/{ => test}/X3dInterpolatorsTest.java (98%) create mode 100644 test/edu/nps/moves/dis7/test/package-info.java diff --git a/test/edu/nps/moves/dis7/AllPduRoundTripTest.java b/test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java similarity index 99% rename from test/edu/nps/moves/dis7/AllPduRoundTripTest.java rename to test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java index f28f9b9341..1b62403537 100644 --- a/test/edu/nps/moves/dis7/AllPduRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/AllPduRoundTripTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +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., diff --git a/test/edu/nps/moves/dis7/BitFieldRoundTripTest.java b/test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java similarity index 99% rename from test/edu/nps/moves/dis7/BitFieldRoundTripTest.java rename to test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java index 9555eede85..d7dd79acb5 100644 --- a/test/edu/nps/moves/dis7/BitFieldRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/BitFieldRoundTripTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.AppearanceCamouflageType; import edu.nps.moves.dis7.enumerations.ForceID; diff --git a/test/edu/nps/moves/dis7/CommentPdusTest.java b/test/edu/nps/moves/dis7/test/CommentPdusTest.java similarity index 99% rename from test/edu/nps/moves/dis7/CommentPdusTest.java rename to test/edu/nps/moves/dis7/test/CommentPdusTest.java index a60cab955b..d464684e9c 100644 --- a/test/edu/nps/moves/dis7/CommentPdusTest.java +++ b/test/edu/nps/moves/dis7/test/CommentPdusTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.VariableRecordType; import edu.nps.moves.dis7.pdus.Pdu; diff --git a/test/edu/nps/moves/dis7/CreateAllObjectTypesTest.java b/test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java similarity index 99% rename from test/edu/nps/moves/dis7/CreateAllObjectTypesTest.java rename to test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java index f1250be81e..4e508e526e 100644 --- a/test/edu/nps/moves/dis7/CreateAllObjectTypesTest.java +++ b/test/edu/nps/moves/dis7/test/CreateAllObjectTypesTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.pdus.ObjectType; import org.junit.jupiter.api.*; diff --git a/test/edu/nps/moves/dis7/CreateAllPduTypesTest.java b/test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java similarity index 99% rename from test/edu/nps/moves/dis7/CreateAllPduTypesTest.java rename to test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java index ace2705829..4141da8e8b 100644 --- a/test/edu/nps/moves/dis7/CreateAllPduTypesTest.java +++ b/test/edu/nps/moves/dis7/test/CreateAllPduTypesTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.pdus.AcknowledgePdu; import edu.nps.moves.dis7.pdus.AcknowledgeReliablePdu; diff --git a/test/edu/nps/moves/dis7/DataQueryPduRoundTripTest.java b/test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java similarity index 99% rename from test/edu/nps/moves/dis7/DataQueryPduRoundTripTest.java rename to test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java index eaec4deaf2..44970d6e99 100644 --- a/test/edu/nps/moves/dis7/DataQueryPduRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/DataQueryPduRoundTripTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.VariableRecordType; import edu.nps.moves.dis7.pdus.DataQueryPdu; diff --git a/test/edu/nps/moves/dis7/DetonationPduTest.java b/test/edu/nps/moves/dis7/test/DetonationPduTest.java similarity index 99% rename from test/edu/nps/moves/dis7/DetonationPduTest.java rename to test/edu/nps/moves/dis7/test/DetonationPduTest.java index 0e0a8207ec..4f779c3381 100644 --- a/test/edu/nps/moves/dis7/DetonationPduTest.java +++ b/test/edu/nps/moves/dis7/test/DetonationPduTest.java @@ -31,7 +31,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.pdus.DetonationPdu; import edu.nps.moves.dis7.pdus.Pdu; diff --git a/test/edu/nps/moves/dis7/EntityStatePduTest.java b/test/edu/nps/moves/dis7/test/EntityStatePduTest.java similarity index 99% rename from test/edu/nps/moves/dis7/EntityStatePduTest.java rename to test/edu/nps/moves/dis7/test/EntityStatePduTest.java index 49e6b0cd86..dfa61f78c4 100644 --- a/test/edu/nps/moves/dis7/EntityStatePduTest.java +++ b/test/edu/nps/moves/dis7/test/EntityStatePduTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.Country; import edu.nps.moves.dis7.enumerations.EntityKind; diff --git a/test/edu/nps/moves/dis7/FirePduTest.java b/test/edu/nps/moves/dis7/test/FirePduTest.java similarity index 99% rename from test/edu/nps/moves/dis7/FirePduTest.java rename to test/edu/nps/moves/dis7/test/FirePduTest.java index 2092356c6f..7899ca06ea 100644 --- a/test/edu/nps/moves/dis7/FirePduTest.java +++ b/test/edu/nps/moves/dis7/test/FirePduTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.utilities.PduFactory; import edu.nps.moves.dis7.pdus.FirePdu; diff --git a/test/edu/nps/moves/dis7/FixedAndVariableDatumRoundTripTest.java b/test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java similarity index 99% rename from test/edu/nps/moves/dis7/FixedAndVariableDatumRoundTripTest.java rename to test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java index 4f99a9be8b..e3cfd3afc0 100644 --- a/test/edu/nps/moves/dis7/FixedAndVariableDatumRoundTripTest.java +++ b/test/edu/nps/moves/dis7/test/FixedAndVariableDatumRoundTripTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.VariableRecordType; import edu.nps.moves.dis7.pdus.ActionResponsePdu; diff --git a/test/edu/nps/moves/dis7/MarshalEnumsTest.java b/test/edu/nps/moves/dis7/test/MarshalEnumsTest.java similarity index 99% rename from test/edu/nps/moves/dis7/MarshalEnumsTest.java rename to test/edu/nps/moves/dis7/test/MarshalEnumsTest.java index 49a072a9a2..676f61aa2c 100644 --- a/test/edu/nps/moves/dis7/MarshalEnumsTest.java +++ b/test/edu/nps/moves/dis7/test/MarshalEnumsTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.*; import edu.nps.moves.dis7.pdus.DisBitSet; diff --git a/test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java b/test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java similarity index 99% rename from test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java rename to test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java index 2554fc076d..9f1c92c025 100644 --- a/test/edu/nps/moves/dis7/NullFieldsEntityMarshallTest.java +++ b/test/edu/nps/moves/dis7/test/NullFieldsEntityMarshallTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.entities.usa.platform.land.LAV105; import edu.nps.moves.dis7.pdus.EntityType; diff --git a/test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java b/test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java similarity index 98% rename from test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java rename to test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java index 18c14e5569..50b1c7b5a4 100644 --- a/test/edu/nps/moves/dis7/ObjectTypeMarshallTest.java +++ b/test/edu/nps/moves/dis7/test/ObjectTypeMarshallTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.objectTypes.LinearObject.Culturalfeature.TracksTire.TracksTire; import edu.nps.moves.dis7.objectTypes.LinearObject.Obstacle.ConcertinaWire._2Roll; diff --git a/test/edu/nps/moves/dis7/PduFactoryTest.java b/test/edu/nps/moves/dis7/test/PduFactoryTest.java similarity index 99% rename from test/edu/nps/moves/dis7/PduFactoryTest.java rename to test/edu/nps/moves/dis7/test/PduFactoryTest.java index ae1fb6493b..25bde1cbce 100644 --- a/test/edu/nps/moves/dis7/PduFactoryTest.java +++ b/test/edu/nps/moves/dis7/test/PduFactoryTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.enumerations.Country; import edu.nps.moves.dis7.utilities.PduFactory; diff --git a/test/edu/nps/moves/dis7/PduTest.java b/test/edu/nps/moves/dis7/test/PduTest.java similarity index 99% rename from test/edu/nps/moves/dis7/PduTest.java rename to test/edu/nps/moves/dis7/test/PduTest.java index ff6a16e5b0..7ec0ddc4e6 100644 --- a/test/edu/nps/moves/dis7/PduTest.java +++ b/test/edu/nps/moves/dis7/test/PduTest.java @@ -31,7 +31,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.pdus.Pdu; import edu.nps.moves.dis7.pdus.PduBase; diff --git a/test/edu/nps/moves/dis7/SignalPdusTest.java b/test/edu/nps/moves/dis7/test/SignalPdusTest.java similarity index 99% rename from test/edu/nps/moves/dis7/SignalPdusTest.java rename to test/edu/nps/moves/dis7/test/SignalPdusTest.java index adf06dbbad..ca080e500b 100644 --- a/test/edu/nps/moves/dis7/SignalPdusTest.java +++ b/test/edu/nps/moves/dis7/test/SignalPdusTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.pdus.IntercomSignalPdu; import edu.nps.moves.dis7.pdus.Pdu; diff --git a/test/edu/nps/moves/dis7/X3dInterpolatorsTest.java b/test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java similarity index 98% rename from test/edu/nps/moves/dis7/X3dInterpolatorsTest.java rename to test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java index 0ae573f648..4bc745edfd 100644 --- a/test/edu/nps/moves/dis7/X3dInterpolatorsTest.java +++ b/test/edu/nps/moves/dis7/test/X3dInterpolatorsTest.java @@ -2,7 +2,7 @@ * Copyright (c) 2008-2021, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. * This work is provided under a BSD open-source license, see project license.html and license.txt */ -package edu.nps.moves.dis7; +package edu.nps.moves.dis7.test; import edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface; import edu.nps.moves.dis7.utilities.PduFactory; diff --git a/test/edu/nps/moves/dis7/test/package-info.java b/test/edu/nps/moves/dis7/test/package-info.java new file mode 100644 index 0000000000..a68c7dee34 --- /dev/null +++ b/test/edu/nps/moves/dis7/test/package-info.java @@ -0,0 +1,40 @@ +/* +Copyright (c) 1995-2021 held by the author(s). All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the names of the Naval Postgraduate School (NPS) + Modeling Virtual Environments and Simulation (MOVES) Institute + https://www.nps.edu and https://www.nps.edu/web/moves + nor the names of its contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * This package includes a variety of PDU unit tests to confirm code correctness. + * The test tree is maintained separately from other source in order to support special annotations and assertions. + */ + +package edu.nps.moves.dis7.test; -- GitLab