forked from fishercoder1534/Leetcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1184Test.java
More file actions
42 lines (33 loc) · 1 KB
/
_1184Test.java
File metadata and controls
42 lines (33 loc) · 1 KB
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
package com.fishercoder;
import com.fishercoder.solutions._1184;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class _1184Test {
private static _1184.Solution1 solution1;
private static int[] distance;
@BeforeClass
public static void setup() {
solution1 = new _1184.Solution1();
}
@Test
public void test1() {
distance = new int[]{1, 2, 3, 4};
assertEquals(1, solution1.distanceBetweenBusStops(distance, 0, 1));
}
@Test
public void test2() {
distance = new int[]{1, 2, 3, 4};
assertEquals(4, solution1.distanceBetweenBusStops(distance, 0, 3));
}
@Test
public void test3() {
distance = new int[]{1, 2, 3, 4};
assertEquals(3, solution1.distanceBetweenBusStops(distance, 0, 2));
}
@Test
public void test4() {
distance = new int[]{7,10,1,12,11,14,5,0};
assertEquals(17, solution1.distanceBetweenBusStops(distance, 7, 2));
}
}