|
1 | 1 | package com.fishercoder.firstthousand; |
2 | 2 |
|
3 | | -import com.fishercoder.solutions.firstthousand._985; |
| 3 | +import com.fishercoder.solutions.firstthousand._351; |
4 | 4 | import org.junit.jupiter.api.BeforeEach; |
5 | 5 | import org.junit.jupiter.api.Test; |
6 | 6 |
|
7 | 7 | import static org.junit.jupiter.api.Assertions.assertArrayEquals; |
| 8 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
8 | 9 |
|
9 | 10 | public class _351Test { |
10 | | - private static _985.Solution1 solution1; |
11 | | - private static int[] expected; |
12 | | - private static int[] actual; |
13 | | - private static int[] A; |
14 | | - private static int[][] queries; |
| 11 | + private static _351.Solution1 solution1; |
15 | 12 |
|
16 | 13 | @BeforeEach |
17 | 14 | public void setup() { |
18 | | - solution1 = new _985.Solution1(); |
| 15 | + solution1 = new _351.Solution1(); |
19 | 16 | } |
20 | 17 |
|
21 | 18 | @Test |
22 | 19 | public void test1() { |
23 | | - A = new int[]{1, 2, 3, 4}; |
24 | | - queries = new int[][]{{1, 0}, {-3, 1}, {-4, 0}, {2, 3}}; |
25 | | - expected = new int[]{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 | } |
0 commit comments