Skip to content

Commit

Permalink
test: clean test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Flashky committed Dec 9, 2024
1 parent 21cf070 commit ac4e0cc
Show file tree
Hide file tree
Showing 17 changed files with 283 additions and 148 deletions.
2 changes: 1 addition & 1 deletion src/test/java/com/adventofcode/flashk/day06/Day06Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void testSolvePart1Sample() {
char[][] inputs = Input.read2DCharArray(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);
GuardGallivant guardGallivant = new GuardGallivant(inputs);

assertEquals(41,guardGallivant.solveA());
assertEquals(41, guardGallivant.solveA());
}

@Test
Expand Down
31 changes: 17 additions & 14 deletions src/test/java/com/adventofcode/flashk/day10/Day10Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
import com.adventofcode.flashk.common.test.utils.Input;

import static org.junit.jupiter.api.Assertions.assertEquals;

@DisplayName(TestDisplayName.DAY_10)
@TestMethodOrder(OrderAnnotation.class)
@Disabled // TODO Remove comment when implemented
public class Day10Test extends PuzzleTest {

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

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
Expand All @@ -42,12 +44,13 @@ public void testSolvePart1Sample() {
@Tag(TestTag.INPUT)
@DisplayName(TestDisplayName.PART_1_INPUT)
public void testSolvePart1Input() {

System.out.print("1 | input | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

@Test
Expand All @@ -56,12 +59,11 @@ public void testSolvePart1Input() {
@Tag(TestTag.SAMPLE)
@DisplayName(TestDisplayName.PART_2_SAMPLE)
public void testSolvePart2Sample() {

System.out.print("2 | sample | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
Expand All @@ -70,12 +72,13 @@ public void testSolvePart2Sample() {
@Tag(TestTag.INPUT)
@DisplayName(TestDisplayName.PART_2_INPUT)
public void testSolvePart2Input() {

System.out.print("2 | input | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

}
40 changes: 21 additions & 19 deletions src/test/java/com/adventofcode/flashk/day11/Day11Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
import com.adventofcode.flashk.common.test.utils.Input;

import static org.junit.jupiter.api.Assertions.assertEquals;

@DisplayName(TestDisplayName.DAY_11)
@TestMethodOrder(OrderAnnotation.class)
@Disabled // TODO Remove comment when implemented
Expand All @@ -30,54 +32,54 @@ public class Day11Test extends PuzzleTest {
@Tag(TestTag.SAMPLE)
@DisplayName(TestDisplayName.PART_1_SAMPLE)
public void testSolvePart1Sample() {

System.out.print("1 | sample | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(2)
@Tag(TestTag.PART_1)
@Tag(TestTag.INPUT)
@DisplayName(TestDisplayName.PART_1_INPUT)
public void testSolvePart1Input() {

System.out.print("1 | input | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

@Test
@Order(3)
@Tag(TestTag.PART_2)
@Tag(TestTag.SAMPLE)
@DisplayName(TestDisplayName.PART_2_SAMPLE)
public void testSolvePart2Sample() {

System.out.print("2 | sample | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(4)
@Tag(TestTag.PART_2)
@Tag(TestTag.INPUT)
@DisplayName(TestDisplayName.PART_2_INPUT)
public void testSolvePart2Input() {

System.out.print("2 | input | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

}
24 changes: 17 additions & 7 deletions src/test/java/com/adventofcode/flashk/day12/Day12Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
import com.adventofcode.flashk.common.test.utils.Input;

import static org.junit.jupiter.api.Assertions.assertEquals;

@DisplayName(TestDisplayName.DAY_12)
@TestMethodOrder(OrderAnnotation.class)
@Disabled // TODO Remove comment when implemented
Expand All @@ -33,9 +35,10 @@ public void testSolvePart1Sample() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(2)
@Tag(TestTag.PART_1)
Expand All @@ -45,9 +48,12 @@ public void testSolvePart1Input() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

@Test
@Order(3)
@Tag(TestTag.PART_2)
Expand All @@ -57,9 +63,10 @@ public void testSolvePart2Sample() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(4)
@Tag(TestTag.PART_2)
Expand All @@ -69,7 +76,10 @@ public void testSolvePart2Input() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

}
42 changes: 22 additions & 20 deletions src/test/java/com/adventofcode/flashk/day13/Day13Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,67 +17,69 @@
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
import com.adventofcode.flashk.common.test.utils.Input;

import static org.junit.jupiter.api.Assertions.assertEquals;

@DisplayName(TestDisplayName.DAY_13)
@TestMethodOrder(OrderAnnotation.class)
@Disabled // TODO Remove comment when implemented
public class Day13Test extends PuzzleTest {

private static final String INPUT_FOLDER = TestFolder.DAY_13;

@Test
@Order(1)
@Tag(TestTag.PART_1)
@Tag(TestTag.SAMPLE)
@DisplayName(TestDisplayName.PART_1_SAMPLE)
public void testSolvePart1Sample() {

System.out.print("1 | sample | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(2)
@Tag(TestTag.PART_1)
@Tag(TestTag.INPUT)
@DisplayName(TestDisplayName.PART_1_INPUT)
public void testSolvePart1Input() {

System.out.print("1 | input | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

@Test
@Order(3)
@Tag(TestTag.PART_2)
@Tag(TestTag.SAMPLE)
@DisplayName(TestDisplayName.PART_2_SAMPLE)
public void testSolvePart2Sample() {

System.out.print("2 | sample | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(4)
@Tag(TestTag.PART_2)
@Tag(TestTag.INPUT)
@DisplayName(TestDisplayName.PART_2_INPUT)
public void testSolvePart2Input() {

System.out.print("2 | input | ");


// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

}
24 changes: 17 additions & 7 deletions src/test/java/com/adventofcode/flashk/day14/Day14Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import com.adventofcode.flashk.common.test.utils.PuzzleTest;
import com.adventofcode.flashk.common.test.utils.Input;

import static org.junit.jupiter.api.Assertions.assertEquals;

@DisplayName(TestDisplayName.DAY_14)
@TestMethodOrder(OrderAnnotation.class)
@Disabled // TODO Remove comment when implemented
Expand All @@ -33,9 +35,10 @@ public void testSolvePart1Sample() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(2)
@Tag(TestTag.PART_1)
Expand All @@ -45,9 +48,12 @@ public void testSolvePart1Input() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

@Test
@Order(3)
@Tag(TestTag.PART_2)
Expand All @@ -57,9 +63,10 @@ public void testSolvePart2Sample() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE_SAMPLE);


assertEquals(0L,0L);
}

@Test
@Order(4)
@Tag(TestTag.PART_2)
Expand All @@ -69,7 +76,10 @@ public void testSolvePart2Input() {

// Read input file
List<String> inputs = Input.readStringLines(INPUT_FOLDER, TestFilename.INPUT_FILE);


System.out.println("Solution: ");
assertEquals(0L,0L);

}

}
Loading

0 comments on commit ac4e0cc

Please sign in to comment.