mirror of
https://bitbucket.org/Mattrixwv/projecteulerjava.git
synced 2025-12-06 17:13:58 -05:00
Update test coverage
This commit is contained in:
@@ -4,14 +4,15 @@ package com.mattrixwv.project_euler.problems;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Order;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.InjectMocks;
|
||||
|
||||
import com.mattrixwv.project_euler.exceptions.Unsolved;
|
||||
|
||||
|
||||
public class TestProblem24 extends ProblemBaseTest{
|
||||
public class TestProblem24 extends TestProblemBase{
|
||||
@InjectMocks
|
||||
private Problem24Override problem;
|
||||
static{
|
||||
@@ -21,14 +22,12 @@ public class TestProblem24 extends ProblemBaseTest{
|
||||
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
@Override
|
||||
public void testDescription(){
|
||||
super.testDescription(problem);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(2)
|
||||
@Override
|
||||
public void testSolve(){
|
||||
assertThrows(Unsolved.class, () -> { problem.getPermutationsList(); });
|
||||
@@ -42,12 +41,21 @@ public class TestProblem24 extends ProblemBaseTest{
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(3)
|
||||
@Override
|
||||
public void testReset(){
|
||||
//Setup
|
||||
problem.permutations = new ArrayList<>();
|
||||
problem.permutations.add("1");
|
||||
problem.solved = true;
|
||||
|
||||
super.testReset(problem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void verifyReset(){
|
||||
assertEquals(new ArrayList<>(), problem.permutations);
|
||||
}
|
||||
|
||||
|
||||
public static class Problem24Override extends Problem24{
|
||||
static{
|
||||
|
||||
Reference in New Issue
Block a user