|
1 | 1 | packagecom.fishercoder.firstthousand;
|
2 | 2 |
|
3 |
| -importcom.fishercoder.solutions.firstthousand._985; |
| 3 | +importcom.fishercoder.solutions.firstthousand._351; |
4 | 4 | importorg.junit.jupiter.api.BeforeEach;
|
5 | 5 | importorg.junit.jupiter.api.Test;
|
6 | 6 |
|
7 | 7 | importstaticorg.junit.jupiter.api.Assertions.assertArrayEquals;
|
| 8 | +importstaticorg.junit.jupiter.api.Assertions.assertEquals; |
8 | 9 |
|
9 | 10 | publicclass_351Test {
|
10 |
| -privatestatic_985.Solution1solution1; |
11 |
| -privatestaticint[]expected; |
12 |
| -privatestaticint[]actual; |
13 |
| -privatestaticint[]A; |
14 |
| -privatestaticint[][]queries; |
| 11 | +privatestatic_351.Solution1solution1; |
15 | 12 |
|
16 | 13 | @BeforeEach
|
17 | 14 | publicvoidsetup() {
|
18 |
| -solution1 =new_985.Solution1(); |
| 15 | +solution1 =new_351.Solution1(); |
19 | 16 | }
|
20 | 17 |
|
21 | 18 | @Test
|
22 | 19 | publicvoidtest1() {
|
23 |
| -A =newint[]{1,2,3,4}; |
24 |
| -queries =newint[][]{{1,0}, {-3,1}, {-4,0}, {2,3}}; |
25 |
| -expected =newint[]{8,6,2,4}; |
26 |
| -actual =solution1.sumEvenAfterQueries(A,queries); |
27 |
| -assertArrayEquals(expected,actual); |
| 20 | +assertEquals(9,solution1.numberOfPatterns(1,1)); |
28 | 21 | }
|
29 | 22 | }
|