forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1011Test.java
More file actions
34 lines (27 loc) · 800 Bytes
/
_1011Test.java
File metadata and controls
34 lines (27 loc) · 800 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
package com.fishercoder;
import com.fishercoder.solutions._1011;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class _1011Test {
private static _1011.Solution1 solution1;
@BeforeClass
public static void setup() {
solution1 = new _1011.Solution1();
}
@Test
public void test1() {
int[] weights = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
assertEquals(solution1.shipWithinDays(weights, 5), 15);
}
@Test
public void test2() {
int[] weights = {3, 2, 2, 4, 1, 4};
assertEquals(solution1.shipWithinDays(weights, 3), 6);
}
@Test
public void test3() {
int[] weights = {1, 2, 3, 1, 1};
assertEquals(solution1.shipWithinDays(weights, 4), 3);
}
}