-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathGIsHappyTest.java
More file actions
51 lines (40 loc) · 1.08 KB
/
GIsHappyTest.java
File metadata and controls
51 lines (40 loc) · 1.08 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
package io.zipcoder.stringsandthings;
import io.zipcoder.StringsAndThings;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
/**
* @author leon on 29/01/2019.
*/
public class GIsHappyTest {
private StringsAndThings stringsAndThings;
@Before
public void setup(){
stringsAndThings = new StringsAndThings();
}
@Test
public void gIsHappyTest1(){
Boolean actual = stringsAndThings.gIsHappy("xxggxx");
Assert.assertTrue(actual);
}
@Test
public void gIsHappyTest2(){
Boolean actual = stringsAndThings.gIsHappy("xxgxx");
Assert.assertFalse(actual);
}
@Test
public void gIsHappyTest3(){
Boolean actual = stringsAndThings.gIsHappy("xxggyygxx");
Assert.assertFalse(actual);
}
@Test
public void gIsHappyTest4(){
Boolean actual = stringsAndThings.gIsHappy("ggxggyyxxgg");
Assert.assertTrue(actual);
}
@Test
public void gIsHappyTest5(){
Boolean actual = stringsAndThings.gIsHappy("gxxyyxxg");
Assert.assertFalse(actual);
}
}