forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1207Test.java
More file actions
35 lines (28 loc) · 818 Bytes
/
_1207Test.java
File metadata and controls
35 lines (28 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.fishercoder;
import com.fishercoder.solutions._1207;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class _1207Test {
private static _1207.Solution1 solution1;
private static int[] arr;
@BeforeClass
public static void setup() {
solution1 = new _1207.Solution1();
}
@Test
public void test1() {
arr = new int[]{1, 2, 2, 1, 1, 3};
assertEquals(true, solution1.uniqueOccurrences(arr));
}
@Test
public void test2() {
arr = new int[]{1, 2};
assertEquals(false, solution1.uniqueOccurrences(arr));
}
@Test
public void test3() {
arr = new int[]{-3, 0, 1, -3, 1, 1, 1, -3, 10, 0};
assertEquals(true, solution1.uniqueOccurrences(arr));
}
}