-
-
Notifications
You must be signed in to change notification settings - Fork 312
Expand file tree
/
Copy pathUnitTesting.java
More file actions
43 lines (28 loc) · 662 Bytes
/
UnitTesting.java
File metadata and controls
43 lines (28 loc) · 662 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
40
41
42
43
package tests;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
public class MyClass {
@Test
public void test_01() {
//assertThrows()
assertThrows(IllegalArgumentException.class,() ->{
CompressString.compress("");
});
}
@Test
public void test_02() {
assertEquals("a2b",CompressString.compress("aab"));
}
@Test
public void test_03() {
assertEquals("ab",CompressString.compress("ab"));
}
@Test
public void test_04() {
assertEquals("abc",CompressString.compress("abc"));
}
@Test
public void test_05() {
assertEquals("abc2",CompressString.compress("abcc"));
}
}