Skip to content

Commit 8586f45

Browse files
committed
add direction test
1 parent 0b7a14d commit 8586f45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

org-code-javabuilder/validation/src/test/java/org/code/validation/support/PainterTrackerTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,25 @@ public void testMoveEventUpdatesPosition() {
3232
// Should move to (2, 1)
3333
assertEquals(2, unitUnderTest.getCurrentPosition().getX());
3434
assertEquals(1, unitUnderTest.getCurrentPosition().getY());
35+
assertEquals("east", unitUnderTest.getCurrentPosition().getDirection());
3536

3637
unitUnderTest.trackEvent(createMoveEvent(Direction.SOUTH));
3738
// Should move to (2, 2)
3839
assertEquals(2, unitUnderTest.getCurrentPosition().getX());
3940
assertEquals(2, unitUnderTest.getCurrentPosition().getY());
41+
assertEquals("south", unitUnderTest.getCurrentPosition().getDirection());
4042

4143
unitUnderTest.trackEvent(createMoveEvent(Direction.WEST));
4244
// Should move to (1, 2)
4345
assertEquals(1, unitUnderTest.getCurrentPosition().getX());
4446
assertEquals(2, unitUnderTest.getCurrentPosition().getY());
47+
assertEquals("west", unitUnderTest.getCurrentPosition().getDirection());
4548

4649
unitUnderTest.trackEvent(createMoveEvent(Direction.NORTH));
4750
// Should move to (1, 1)
4851
assertEquals(1, unitUnderTest.getCurrentPosition().getX());
4952
assertEquals(1, unitUnderTest.getCurrentPosition().getY());
53+
assertEquals("north", unitUnderTest.getCurrentPosition().getDirection());
5054
}
5155

5256
@Test

0 commit comments

Comments
 (0)