Skip to content

Commit 4c719b1

Browse files
committed
test: clean tests
1 parent b038bb7 commit 4c719b1

File tree

28 files changed

+113
-543
lines changed

28 files changed

+113
-543
lines changed

src/test/java/com/adventofcode/flashk/common/test/utils/PuzzleTest.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@
55

66
public abstract class PuzzleTest {
77

8-
private Timer timer = new Timer();
9-
10-
@BeforeEach
11-
public void before() {
12-
timer.start();
13-
}
14-
15-
@AfterEach
16-
public void after() {
17-
timer.stop();
18-
}
19-
20-
218
public abstract void testSolvePart1Sample();
229
public abstract void testSolvePart1Input();
2310
public abstract void testSolvePart2Sample();

src/test/java/com/adventofcode/flashk/common/test/utils/TableFormat.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/test/java/com/adventofcode/flashk/common/test/utils/Timer.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/test/java/com/adventofcode/flashk/day01/Day01Test.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import java.util.List;
44

5-
import org.junit.jupiter.api.BeforeAll;
65
import org.junit.jupiter.api.Disabled;
76
import org.junit.jupiter.api.DisplayName;
87
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
@@ -16,31 +15,22 @@
1615
import com.adventofcode.flashk.common.test.constants.TestFolder;
1716
import com.adventofcode.flashk.common.test.constants.TestTag;
1817
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
19-
import com.adventofcode.flashk.common.test.utils.Timer;
2018
import com.adventofcode.flashk.common.test.utils.Input;
2119

2220
@DisplayName(TestDisplayName.DAY_01)
2321
@TestMethodOrder(OrderAnnotation.class)
2422
@Disabled // TODO Remove comment when implemented
2523
public class Day01Test extends PuzzleTest {
2624

27-
private final static String INPUT_FOLDER = TestFolder.DAY_01;
25+
private static final String INPUT_FOLDER = TestFolder.DAY_01;
2826

29-
@BeforeAll
30-
public static void beforeAll() {
31-
Timer.printHeader(TestDisplayName.DAY_01);
32-
}
33-
34-
3527
@Test
3628
@Order(1)
3729
@Tag(TestTag.PART_ONE)
3830
@Tag(TestTag.SAMPLE)
3931
@DisplayName(TestDisplayName.PART_ONE_SAMPLE)
4032
public void testSolvePart1Sample() {
41-
42-
System.out.print("1 | sample | ");
43-
33+
4434
// Read input file
4535
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
4636

@@ -52,9 +42,7 @@ public void testSolvePart1Sample() {
5242
@Tag(TestTag.INPUT)
5343
@DisplayName(TestDisplayName.PART_ONE_INPUT)
5444
public void testSolvePart1Input() {
55-
56-
System.out.print("1 | input | ");
57-
45+
5846
// Read input file
5947
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
6048

@@ -66,9 +54,7 @@ public void testSolvePart1Input() {
6654
@Tag(TestTag.SAMPLE)
6755
@DisplayName(TestDisplayName.PART_TWO_SAMPLE)
6856
public void testSolvePart2Sample() {
69-
70-
System.out.print("2 | sample | ");
71-
57+
7258
// Read input file
7359
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
7460

@@ -80,9 +66,7 @@ public void testSolvePart2Sample() {
8066
@Tag(TestTag.INPUT)
8167
@DisplayName(TestDisplayName.PART_TWO_INPUT)
8268
public void testSolvePart2Input() {
83-
84-
System.out.print("2 | input | ");
85-
69+
8670
// Read input file
8771
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
8872

src/test/java/com/adventofcode/flashk/day02/Day02Test.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import java.util.List;
44

5-
import org.junit.jupiter.api.BeforeAll;
65
import org.junit.jupiter.api.Disabled;
76
import org.junit.jupiter.api.DisplayName;
87
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
@@ -16,31 +15,22 @@
1615
import com.adventofcode.flashk.common.test.constants.TestFolder;
1716
import com.adventofcode.flashk.common.test.constants.TestTag;
1817
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
19-
import com.adventofcode.flashk.common.test.utils.Timer;
2018
import com.adventofcode.flashk.common.test.utils.Input;
2119

2220
@DisplayName(TestDisplayName.DAY_02)
2321
@TestMethodOrder(OrderAnnotation.class)
2422
@Disabled // TODO Remove comment when implemented
2523
public class Day02Test extends PuzzleTest {
2624

27-
private final static String INPUT_FOLDER = TestFolder.DAY_02;
25+
private static final String INPUT_FOLDER = TestFolder.DAY_02;
2826

29-
@BeforeAll
30-
public static void beforeAll() {
31-
Timer.printHeader(TestDisplayName.DAY_02);
32-
}
33-
34-
3527
@Test
3628
@Order(1)
3729
@Tag(TestTag.PART_ONE)
3830
@Tag(TestTag.SAMPLE)
3931
@DisplayName(TestDisplayName.PART_ONE_SAMPLE)
4032
public void testSolvePart1Sample() {
41-
42-
System.out.print("1 | sample | ");
43-
33+
4434
// Read input file
4535
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
4636

@@ -52,9 +42,7 @@ public void testSolvePart1Sample() {
5242
@Tag(TestTag.INPUT)
5343
@DisplayName(TestDisplayName.PART_ONE_INPUT)
5444
public void testSolvePart1Input() {
55-
56-
System.out.print("1 | input | ");
57-
45+
5846
// Read input file
5947
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
6048

@@ -66,9 +54,7 @@ public void testSolvePart1Input() {
6654
@Tag(TestTag.SAMPLE)
6755
@DisplayName(TestDisplayName.PART_TWO_SAMPLE)
6856
public void testSolvePart2Sample() {
69-
70-
System.out.print("2 | sample | ");
71-
57+
7258
// Read input file
7359
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
7460

@@ -80,9 +66,7 @@ public void testSolvePart2Sample() {
8066
@Tag(TestTag.INPUT)
8167
@DisplayName(TestDisplayName.PART_TWO_INPUT)
8268
public void testSolvePart2Input() {
83-
84-
System.out.print("2 | input | ");
85-
69+
8670
// Read input file
8771
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
8872

src/test/java/com/adventofcode/flashk/day03/Day03Test.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,15 @@
2222
@Disabled // TODO Remove comment when implemented
2323
public class Day03Test extends PuzzleTest {
2424

25-
private final static String INPUT_FOLDER = TestFolder.DAY_03;
26-
27-
25+
private static final String INPUT_FOLDER = TestFolder.DAY_03;
2826

2927
@Test
3028
@Order(1)
3129
@Tag(TestTag.PART_ONE)
3230
@Tag(TestTag.SAMPLE)
3331
@DisplayName(TestDisplayName.PART_ONE_SAMPLE)
3432
public void testSolvePart1Sample() {
35-
36-
System.out.print("1 | sample | ");
37-
33+
3834
// Read input file
3935
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
4036

@@ -46,9 +42,7 @@ public void testSolvePart1Sample() {
4642
@Tag(TestTag.INPUT)
4743
@DisplayName(TestDisplayName.PART_ONE_INPUT)
4844
public void testSolvePart1Input() {
49-
50-
System.out.print("1 | input | ");
51-
45+
5246
// Read input file
5347
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
5448

@@ -60,9 +54,7 @@ public void testSolvePart1Input() {
6054
@Tag(TestTag.SAMPLE)
6155
@DisplayName(TestDisplayName.PART_TWO_SAMPLE)
6256
public void testSolvePart2Sample() {
63-
64-
System.out.print("2 | sample | ");
65-
57+
6658
// Read input file
6759
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
6860

@@ -74,9 +66,7 @@ public void testSolvePart2Sample() {
7466
@Tag(TestTag.INPUT)
7567
@DisplayName(TestDisplayName.PART_TWO_INPUT)
7668
public void testSolvePart2Input() {
77-
78-
System.out.print("2 | input | ");
79-
69+
8070
// Read input file
8171
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
8272

src/test/java/com/adventofcode/flashk/day04/Day04Test.java

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import java.util.List;
44

5-
import org.junit.jupiter.api.BeforeAll;
65
import org.junit.jupiter.api.Disabled;
76
import org.junit.jupiter.api.DisplayName;
87
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
@@ -16,31 +15,22 @@
1615
import com.adventofcode.flashk.common.test.constants.TestFolder;
1716
import com.adventofcode.flashk.common.test.constants.TestTag;
1817
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
19-
import com.adventofcode.flashk.common.test.utils.Timer;
2018
import com.adventofcode.flashk.common.test.utils.Input;
2119

2220
@DisplayName(TestDisplayName.DAY_04)
2321
@TestMethodOrder(OrderAnnotation.class)
2422
@Disabled // TODO Remove comment when implemented
2523
public class Day04Test extends PuzzleTest {
2624

27-
private final static String INPUT_FOLDER = TestFolder.DAY_04;
25+
private static final String INPUT_FOLDER = TestFolder.DAY_04;
2826

29-
@BeforeAll
30-
public static void beforeAll() {
31-
Timer.printHeader(TestDisplayName.DAY_04);
32-
}
33-
34-
3527
@Test
3628
@Order(1)
3729
@Tag(TestTag.PART_ONE)
3830
@Tag(TestTag.SAMPLE)
3931
@DisplayName(TestDisplayName.PART_ONE_SAMPLE)
4032
public void testSolvePart1Sample() {
41-
42-
System.out.print("1 | sample | ");
43-
33+
4434
// Read input file
4535
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
4636

@@ -52,9 +42,7 @@ public void testSolvePart1Sample() {
5242
@Tag(TestTag.INPUT)
5343
@DisplayName(TestDisplayName.PART_ONE_INPUT)
5444
public void testSolvePart1Input() {
55-
56-
System.out.print("1 | input | ");
57-
45+
5846
// Read input file
5947
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
6048

@@ -66,9 +54,7 @@ public void testSolvePart1Input() {
6654
@Tag(TestTag.SAMPLE)
6755
@DisplayName(TestDisplayName.PART_TWO_SAMPLE)
6856
public void testSolvePart2Sample() {
69-
70-
System.out.print("2 | sample | ");
71-
57+
7258
// Read input file
7359
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
7460

@@ -80,9 +66,7 @@ public void testSolvePart2Sample() {
8066
@Tag(TestTag.INPUT)
8167
@DisplayName(TestDisplayName.PART_TWO_INPUT)
8268
public void testSolvePart2Input() {
83-
84-
System.out.print("2 | input | ");
85-
69+
8670
// Read input file
8771
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);
8872

0 commit comments

Comments
 (0)