-
Notifications
You must be signed in to change notification settings - Fork 0
/
LeetCode5856Test.java
45 lines (37 loc) · 1.09 KB
/
LeetCode5856Test.java
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
40
41
42
43
44
45
package me.hackhub.leetcode.solution;
import org.junit.Assert;
import org.junit.Test;
/**
* Copyright © 2017~2021 by hackhub.me
*
* @Author: mesondzh
* @Date: 2021-08-29 17:42
* @Description: https://leetcode-cn.com/problems/minimum-number-of-work-sessions-to-finish-the-tasks/submissions/
*/
public class LeetCode5856Test {
private final LeetCode5856 solution = new LeetCode5856();
@Test
public void test1() {
int[] task = {3, 1, 3, 1, 1};
int sessionTime = 8;
Assert.assertEquals(2, solution.minSessions(task, sessionTime));
}
@Test
public void test2() {
int[] task = {1, 2, 3};
int sessionTime = 3;
Assert.assertEquals(2, solution.minSessions(task, sessionTime));
}
@Test
public void test3() {
int[] task = {1, 2, 3, 4, 5};
int sessionTime = 15;
Assert.assertEquals(1, solution.minSessions(task, sessionTime));
}
@Test
public void test4() {
int[] task = {1, 7};
int sessionTime = 7;
Assert.assertEquals(2, solution.minSessions(task, sessionTime));
}
}