Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
ddd72be8
Commit
ddd72be8
authored
4 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
PDUtype test
parent
1557d74e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/edu/nps/moves/dis7/CommentPdusTest.java
+5
-0
5 additions, 0 deletions
test/edu/nps/moves/dis7/CommentPdusTest.java
with
5 additions
and
0 deletions
test/edu/nps/moves/dis7/CommentPdusTest.java
+
5
−
0
View file @
ddd72be8
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
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
;
...
@@ -61,6 +62,8 @@ public class CommentPdusTest
...
@@ -61,6 +62,8 @@ public class CommentPdusTest
testOne
(
pduFactory
.
makeCommentPdu
(
VariableRecordType
.
MODEL_TYPE
,
"456_test with type = modeltype"
));
testOne
(
pduFactory
.
makeCommentPdu
(
VariableRecordType
.
MODEL_TYPE
,
"456_test with type = modeltype"
));
testOne
(
pduFactory
.
makeCommentPdu
(
"xyz first message"
,
"mno second message"
,
"jkl third message"
));
testOne
(
pduFactory
.
makeCommentPdu
(
"xyz first message"
,
"mno second message"
,
"jkl third message"
));
// TODO alternate constructors, setters and getters for CommentPdu
testOne
(
pduFactory
.
makeCommentReliablePdu
());
testOne
(
pduFactory
.
makeCommentReliablePdu
());
testOne
(
pduFactory
.
makeCommentReliablePdu
(
"789_test_string"
));
testOne
(
pduFactory
.
makeCommentReliablePdu
(
"789_test_string"
));
testOne
(
pduFactory
.
makeCommentReliablePdu
(
VariableRecordType
.
ACLS_AIRCRAFT_REPORT
,
"abc_test with type = acls_aircraft_report"
));
testOne
(
pduFactory
.
makeCommentReliablePdu
(
VariableRecordType
.
ACLS_AIRCRAFT_REPORT
,
"abc_test with type = acls_aircraft_report"
));
...
@@ -81,6 +84,8 @@ public class CommentPdusTest
...
@@ -81,6 +84,8 @@ public class CommentPdusTest
// https://stackoverflow.com/questions/20631621/cannot-find-symbol-assertequals/20631672
// https://stackoverflow.com/questions/20631621/cannot-find-symbol-assertequals/20631672
assertEquals
(
newPdu
.
getMarshalledSize
(),
receivedPdu
.
getMarshalledSize
(),
marshallMismatchMessage
);
assertEquals
(
newPdu
.
getMarshalledSize
(),
receivedPdu
.
getMarshalledSize
(),
marshallMismatchMessage
);
assertTrue
(
compare
(
newPdu
,
receivedPdu
),
"Comparison failed"
);
assertTrue
(
compare
(
newPdu
,
receivedPdu
),
"Comparison failed"
);
assertEquals
(
newPdu
.
getPduType
(),
receivedPdu
.
getPduType
(),
"PDU type mismatch"
);
receivedPdu
=
null
;
// ensure cleared prior to next test
receivedPdu
=
null
;
// ensure cleared prior to next test
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment