File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
src/test/java/com/fishercoder Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .fishercoder ;
2
+
3
+ import com .fishercoder .solutions ._30 ;
4
+ import com .fishercoder .solutions ._39 ;
5
+ import java .util .ArrayList ;
6
+ import java .util .Arrays ;
7
+ import java .util .List ;
8
+ import org .junit .BeforeClass ;
9
+ import org .junit .Test ;
10
+
11
+ import static org .junit .Assert .assertEquals ;
12
+
13
+ public class _39Test {
14
+ private static _39 .Solution1 solution1 ;
15
+ private static int [] candidates ;
16
+ private static List <List <Integer >> expected ;
17
+
18
+ @ BeforeClass
19
+ public static void setup () {
20
+ solution1 = new _39 .Solution1 ();
21
+ }
22
+
23
+ @ Test
24
+ public void test1 () {
25
+ candidates = new int [] {2 , 3 , 6 , 7 };
26
+ expected = new ArrayList <>();
27
+ expected .add (Arrays .asList (2 , 2 , 3 ));
28
+ expected .add (Arrays .asList (7 ));
29
+ assertEquals (expected , solution1 .combinationSum (candidates , 7 ));
30
+ }
31
+ }
You can’t perform that action at this time.
0 commit comments