-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGearsDiv2Test.java
More file actions
64 lines (45 loc) · 1.37 KB
/
GearsDiv2Test.java
File metadata and controls
64 lines (45 loc) · 1.37 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class GearsDiv2Test {
protected GearsDiv2 solution;
@Before
public void setUp() {
solution = new GearsDiv2();
}
@Test(timeout = 2000)
public void testCase0() {
String Directions = "LRRR";
int expected = 1;
int actual = solution.getmin(Directions);
Assert.assertEquals(expected, actual);
}
@Test(timeout = 2000)
public void testCase1() {
String Directions = "RRR";
int expected = 2;
int actual = solution.getmin(Directions);
Assert.assertEquals(expected, actual);
}
@Test(timeout = 2000)
public void testCase2() {
String Directions = "LRLR";
int expected = 0;
int actual = solution.getmin(Directions);
Assert.assertEquals(expected, actual);
}
@Test(timeout = 2000)
public void testCase3() {
String Directions = "LRLLRRLLLRRRLLLL";
int expected = 6;
int actual = solution.getmin(Directions);
Assert.assertEquals(expected, actual);
}
@Test(timeout = 2000)
public void testCase4() {
String Directions = "RRRRRRRLRRRRRRRLRLRLLRLRLRLRRLRLRLLLRLRLLRLLRRLRRR";
int expected = 14;
int actual = solution.getmin(Directions);
Assert.assertEquals(expected, actual);
}
}