-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathGIsHappyTest.java
More file actions
39 lines (30 loc) · 850 Bytes
/
GIsHappyTest.java
File metadata and controls
39 lines (30 loc) · 850 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
35
36
37
38
39
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); //correcting the assertion for test case
}
}