|
31 | 31 |
|
32 | 32 | public class EvaluationTest {
|
33 | 33 |
|
34 |
| - public final CryptaParserWrapper parser = new CryptaParserWrapper(); |
| 34 | + private final CryptaParserWrapper parser = new CryptaParserWrapper(); |
35 | 35 |
|
36 |
| - public final ICryptaEvaluation eval = new CryptaEvaluation(); |
| 36 | + private final ICryptaEvaluation eval = new CryptaEvaluation(); |
37 | 37 |
|
38 | 38 | public EvaluationTest() {
|
39 | 39 | }
|
40 | 40 |
|
41 |
| - private void testInSolution(ICryptaSolution s, char symbol, int digit) throws CryptaSolutionException { |
| 41 | + private void testInSolution(final ICryptaSolution s, final char symbol, final int digit) |
| 42 | + throws CryptaSolutionException { |
42 | 43 | assertTrue(s.hasDigit(symbol));
|
43 | 44 | assertTrue(s.hasDomain(symbol));
|
44 | 45 | assertEquals(digit, s.getDigit(symbol));
|
45 | 46 | assertNotNull(s.getDomain(symbol));
|
46 | 47 | }
|
47 | 48 |
|
48 |
| - private void testNotInSolution(ICryptaSolution s, char symbol) throws CryptaSolutionException { |
| 49 | + private void testNotInSolution(final ICryptaSolution s, final char symbol) throws CryptaSolutionException { |
49 | 50 | assertFalse(s.hasDigit(symbol));
|
50 | 51 | assertFalse(s.hasDomain(symbol));
|
51 | 52 | assertNotNull(s.getDomain(symbol));
|
@@ -90,12 +91,12 @@ public void testInvalidSolutionParser3() throws CryptaSolutionException {
|
90 | 91 | CryptaSolutionMap.parseSolution("A 1 B");
|
91 | 92 | }
|
92 | 93 |
|
93 |
| - private void assertTrueEval(ICryptaNode cryptarithm, ICryptaSolution solution, int base) |
| 94 | + private void assertTrueEval(final ICryptaNode cryptarithm, final ICryptaSolution solution, final int base) |
94 | 95 | throws CryptaEvaluationException {
|
95 | 96 | assertEquals(BigInteger.ONE, eval.evaluate(cryptarithm, solution, base));
|
96 | 97 | }
|
97 | 98 |
|
98 |
| - private void assertFalseEval(ICryptaNode cryptarithm, ICryptaSolution solution, int base) |
| 99 | + private void assertFalseEval(final ICryptaNode cryptarithm, final ICryptaSolution solution, final int base) |
99 | 100 | throws CryptaEvaluationException {
|
100 | 101 | assertEquals(BigInteger.ZERO, eval.evaluate(cryptarithm, solution, base));
|
101 | 102 | }
|
@@ -188,7 +189,7 @@ public void testEvaluation9() throws CryptaParserException, CryptaSolutionExcept
|
188 | 189 | assertTrueEval(cryptarithm, solution, 4);
|
189 | 190 | }
|
190 | 191 |
|
191 |
| - public void testPartialSolution(String cryptarithm, String partialSolution) |
| 192 | + public void testPartialSolution(final String cryptarithm, final String partialSolution) |
192 | 193 | throws CryptaParserException, CryptaSolutionException, CryptaEvaluationException {
|
193 | 194 | final ICryptaNode node = parser.parse(cryptarithm);
|
194 | 195 | final ICryptaSolution solution = CryptaSolutionMap.parseSolution(partialSolution);
|
|
0 commit comments