-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay15Test.java
36 lines (27 loc) · 1.07 KB
/
Day15Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package aoc2019.day15;
import org.junit.jupiter.api.Test;
import static aoc2019.day09.Day9Kt.readInput;
import static aoc2019.day15.Day15.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class Day15Test {
private static final String INPUT1 = "src/main/java/aoc2019/day15/input1";
@Test
public void testReadInput() {
System.out.println(readInput(INPUT1));
}
@Test
public void testProcessInput() {
processInput(readInput(INPUT1));
}
@Test
public void testGetRelativeWestOfCurrentDirection() {
assertEquals(Direction.WEST, getRelativeWestOfCurrentDirection(Direction.NORTH));
assertEquals(Direction.NORTH, getRelativeWestOfCurrentDirection(Direction.EAST));
assertEquals(Direction.EAST, getRelativeWestOfCurrentDirection(Direction.SOUTH));
assertEquals(Direction.SOUTH, getRelativeWestOfCurrentDirection(Direction.WEST));
}
@Test
public void testFindStepsToOxigenMachine() {
assertEquals(242, findStepsToOxigenMachine(processInput(readInput(INPUT1))));
}
}