Skip to content

Commit ac4e0cc

Browse files
committed
test: clean test code
1 parent 21cf070 commit ac4e0cc

File tree

17 files changed

+283
-148
lines changed

17 files changed

+283
-148
lines changed

src/test/java/com/adventofcode/flashk/day06/Day06Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void testSolvePart1Sample() {
3333
char[][] inputs = Input.read2DCharArray(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
3434
GuardGallivant guardGallivant = new GuardGallivant(inputs);
3535

36-
assertEquals(41,guardGallivant.solveA());
36+
assertEquals(41, guardGallivant.solveA());
3737
}
3838

3939
@Test

src/test/java/com/adventofcode/flashk/day10/Day10Test.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
1818
import com.adventofcode.flashk.common.test.utils.Input;
1919

20+
import static org.junit.jupiter.api.Assertions.assertEquals;
21+
2022
@DisplayName(TestDisplayName.DAY_10)
2123
@TestMethodOrder(OrderAnnotation.class)
22-
@Disabled // TODO Remove comment when implemented
2324
public class Day10Test extends PuzzleTest {
2425

2526
private static final String INPUT_FOLDER = TestFolder.DAY_10;
@@ -33,7 +34,8 @@ public void testSolvePart1Sample() {
3334

3435
// Read input file
3536
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
36-
37+
38+
assertEquals(0L,0L);
3739
}
3840

3941
@Test
@@ -42,12 +44,13 @@ public void testSolvePart1Sample() {
4244
@Tag(TestTag.INPUT)
4345
@DisplayName(TestDisplayName.PART_1_INPUT)
4446
public void testSolvePart1Input() {
45-
46-
System.out.print("1 | input | ");
47-
47+
4848
// Read input file
4949
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
50-
50+
51+
System.out.println("Solution: ");
52+
assertEquals(0L,0L);
53+
5154
}
5255

5356
@Test
@@ -56,12 +59,11 @@ public void testSolvePart1Input() {
5659
@Tag(TestTag.SAMPLE)
5760
@DisplayName(TestDisplayName.PART_2_SAMPLE)
5861
public void testSolvePart2Sample() {
59-
60-
System.out.print("2 | sample | ");
61-
62+
6263
// Read input file
6364
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
64-
65+
66+
assertEquals(0L,0L);
6567
}
6668

6769
@Test
@@ -70,12 +72,13 @@ public void testSolvePart2Sample() {
7072
@Tag(TestTag.INPUT)
7173
@DisplayName(TestDisplayName.PART_2_INPUT)
7274
public void testSolvePart2Input() {
73-
74-
System.out.print("2 | input | ");
75-
75+
7676
// Read input file
7777
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
78-
78+
79+
System.out.println("Solution: ");
80+
assertEquals(0L,0L);
81+
7982
}
8083

8184
}

src/test/java/com/adventofcode/flashk/day11/Day11Test.java

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
1818
import com.adventofcode.flashk.common.test.utils.Input;
1919

20+
import static org.junit.jupiter.api.Assertions.assertEquals;
21+
2022
@DisplayName(TestDisplayName.DAY_11)
2123
@TestMethodOrder(OrderAnnotation.class)
2224
@Disabled // TODO Remove comment when implemented
@@ -30,54 +32,54 @@ public class Day11Test extends PuzzleTest {
3032
@Tag(TestTag.SAMPLE)
3133
@DisplayName(TestDisplayName.PART_1_SAMPLE)
3234
public void testSolvePart1Sample() {
33-
34-
System.out.print("1 | sample | ");
35-
35+
3636
// Read input file
3737
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
38-
38+
39+
assertEquals(0L,0L);
3940
}
40-
41+
4142
@Test
4243
@Order(2)
4344
@Tag(TestTag.PART_1)
4445
@Tag(TestTag.INPUT)
4546
@DisplayName(TestDisplayName.PART_1_INPUT)
4647
public void testSolvePart1Input() {
47-
48-
System.out.print("1 | input | ");
49-
48+
5049
// Read input file
5150
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
52-
51+
52+
System.out.println("Solution: ");
53+
assertEquals(0L,0L);
54+
5355
}
54-
56+
5557
@Test
5658
@Order(3)
5759
@Tag(TestTag.PART_2)
5860
@Tag(TestTag.SAMPLE)
5961
@DisplayName(TestDisplayName.PART_2_SAMPLE)
6062
public void testSolvePart2Sample() {
61-
62-
System.out.print("2 | sample | ");
63-
63+
6464
// Read input file
6565
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
66-
66+
67+
assertEquals(0L,0L);
6768
}
68-
69+
6970
@Test
7071
@Order(4)
7172
@Tag(TestTag.PART_2)
7273
@Tag(TestTag.INPUT)
7374
@DisplayName(TestDisplayName.PART_2_INPUT)
7475
public void testSolvePart2Input() {
75-
76-
System.out.print("2 | input | ");
77-
76+
7877
// Read input file
7978
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
80-
79+
80+
System.out.println("Solution: ");
81+
assertEquals(0L,0L);
82+
8183
}
8284

8385
}

src/test/java/com/adventofcode/flashk/day12/Day12Test.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
1818
import com.adventofcode.flashk.common.test.utils.Input;
1919

20+
import static org.junit.jupiter.api.Assertions.assertEquals;
21+
2022
@DisplayName(TestDisplayName.DAY_12)
2123
@TestMethodOrder(OrderAnnotation.class)
2224
@Disabled // TODO Remove comment when implemented
@@ -33,9 +35,10 @@ public void testSolvePart1Sample() {
3335

3436
// Read input file
3537
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
36-
38+
39+
assertEquals(0L,0L);
3740
}
38-
41+
3942
@Test
4043
@Order(2)
4144
@Tag(TestTag.PART_1)
@@ -45,9 +48,12 @@ public void testSolvePart1Input() {
4548

4649
// Read input file
4750
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
48-
51+
52+
System.out.println("Solution: ");
53+
assertEquals(0L,0L);
54+
4955
}
50-
56+
5157
@Test
5258
@Order(3)
5359
@Tag(TestTag.PART_2)
@@ -57,9 +63,10 @@ public void testSolvePart2Sample() {
5763

5864
// Read input file
5965
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
60-
66+
67+
assertEquals(0L,0L);
6168
}
62-
69+
6370
@Test
6471
@Order(4)
6572
@Tag(TestTag.PART_2)
@@ -69,7 +76,10 @@ public void testSolvePart2Input() {
6976

7077
// Read input file
7178
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
72-
79+
80+
System.out.println("Solution: ");
81+
assertEquals(0L,0L);
82+
7383
}
7484

7585
}

src/test/java/com/adventofcode/flashk/day13/Day13Test.java

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,67 +17,69 @@
1717
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
1818
import com.adventofcode.flashk.common.test.utils.Input;
1919

20+
import static org.junit.jupiter.api.Assertions.assertEquals;
21+
2022
@DisplayName(TestDisplayName.DAY_13)
2123
@TestMethodOrder(OrderAnnotation.class)
2224
@Disabled // TODO Remove comment when implemented
2325
public class Day13Test extends PuzzleTest {
2426

2527
private static final String INPUT_FOLDER = TestFolder.DAY_13;
26-
28+
2729
@Test
2830
@Order(1)
2931
@Tag(TestTag.PART_1)
3032
@Tag(TestTag.SAMPLE)
3133
@DisplayName(TestDisplayName.PART_1_SAMPLE)
3234
public void testSolvePart1Sample() {
33-
34-
System.out.print("1 | sample | ");
35-
35+
3636
// Read input file
3737
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
38-
38+
39+
assertEquals(0L,0L);
3940
}
40-
41+
4142
@Test
4243
@Order(2)
4344
@Tag(TestTag.PART_1)
4445
@Tag(TestTag.INPUT)
4546
@DisplayName(TestDisplayName.PART_1_INPUT)
4647
public void testSolvePart1Input() {
47-
48-
System.out.print("1 | input | ");
49-
48+
5049
// Read input file
5150
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
52-
51+
52+
System.out.println("Solution: ");
53+
assertEquals(0L,0L);
54+
5355
}
54-
56+
5557
@Test
5658
@Order(3)
5759
@Tag(TestTag.PART_2)
5860
@Tag(TestTag.SAMPLE)
5961
@DisplayName(TestDisplayName.PART_2_SAMPLE)
6062
public void testSolvePart2Sample() {
61-
62-
System.out.print("2 | sample | ");
63-
63+
6464
// Read input file
6565
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
66-
66+
67+
assertEquals(0L,0L);
6768
}
68-
69+
6970
@Test
7071
@Order(4)
7172
@Tag(TestTag.PART_2)
7273
@Tag(TestTag.INPUT)
7374
@DisplayName(TestDisplayName.PART_2_INPUT)
7475
public void testSolvePart2Input() {
75-
76-
System.out.print("2 | input | ");
77-
76+
7877
// Read input file
7978
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
80-
79+
80+
System.out.println("Solution: ");
81+
assertEquals(0L,0L);
82+
8183
}
8284

8385
}

src/test/java/com/adventofcode/flashk/day14/Day14Test.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
1818
import com.adventofcode.flashk.common.test.utils.Input;
1919

20+
import static org.junit.jupiter.api.Assertions.assertEquals;
21+
2022
@DisplayName(TestDisplayName.DAY_14)
2123
@TestMethodOrder(OrderAnnotation.class)
2224
@Disabled // TODO Remove comment when implemented
@@ -33,9 +35,10 @@ public void testSolvePart1Sample() {
3335

3436
// Read input file
3537
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
36-
38+
39+
assertEquals(0L,0L);
3740
}
38-
41+
3942
@Test
4043
@Order(2)
4144
@Tag(TestTag.PART_1)
@@ -45,9 +48,12 @@ public void testSolvePart1Input() {
4548

4649
// Read input file
4750
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
48-
51+
52+
System.out.println("Solution: ");
53+
assertEquals(0L,0L);
54+
4955
}
50-
56+
5157
@Test
5258
@Order(3)
5359
@Tag(TestTag.PART_2)
@@ -57,9 +63,10 @@ public void testSolvePart2Sample() {
5763

5864
// Read input file
5965
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
60-
66+
67+
assertEquals(0L,0L);
6168
}
62-
69+
6370
@Test
6471
@Order(4)
6572
@Tag(TestTag.PART_2)
@@ -69,7 +76,10 @@ public void testSolvePart2Input() {
6976

7077
// Read input file
7178
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
72-
79+
80+
System.out.println("Solution: ");
81+
assertEquals(0L,0L);
82+
7383
}
7484

7585
}

0 commit comments

Comments
 (0)