forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1099Test.java
More file actions
39 lines (30 loc) · 956 Bytes
/
_1099Test.java
File metadata and controls
39 lines (30 loc) · 956 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
36
37
38
39
package com.fishercoder;
import com.fishercoder.solutions._1099;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class _1099Test {
private static _1099.Solution1 solution1;
private static _1099.Solution2 solution2;
@BeforeClass
public static void setup() {
solution1 = new _1099.Solution1();
solution2 = new _1099.Solution2();
}
@Test
public void test1() {
assertEquals(58, solution1.twoSumLessThanK(new int[]{34, 23, 1, 24, 75, 33, 54, 8}, 60));
}
@Test
public void test2() {
assertEquals(-1, solution1.twoSumLessThanK(new int[]{10, 20, 30}, 15));
}
@Test
public void test3() {
assertEquals(58, solution2.twoSumLessThanK(new int[]{34, 23, 1, 24, 75, 33, 54, 8}, 60));
}
@Test
public void test4() {
assertEquals(-1, solution2.twoSumLessThanK(new int[]{10, 20, 30}, 15));
}
}