Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
4bd6bd5d
Commit
4bd6bd5d
authored
Oct 04, 2016
by
Jakob Schöttl
Browse files
Add test
parent
617c2785
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/tests/org/vadere/simulator/models/seating/trainmodel/TestCompartment.java
View file @
4bd6bd5d
...
...
@@ -27,6 +27,20 @@ public class TestCompartment {
assertEquals
(
4
,
c
.
getPersonCount
());
}
@Test
public
void
testIsFull
()
{
final
TrainModel
trainModel
=
new
TestTopographyAndModelBuilder
().
getTrainModel
();
final
Compartment
c
=
trainModel
.
getCompartment
(
11
);
for
(
int
i
=
0
;
i
<
4
;
i
++)
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
assertFalse
(
c
.
isFull
());
sitDownPerson
(
c
,
i
,
j
);
}
assertTrue
(
c
.
isFull
());
}
private
void
sitDownPerson
(
Compartment
c
,
int
seatGroupIndex
,
int
seatIndex
)
{
// not for half-compartments!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment