File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ package tests ;
2
+ import static org .junit .jupiter .api .Assertions .*;
3
+
4
+ import org .junit .jupiter .api .Test ;
5
+
6
+ public class MyClass {
7
+
8
+
9
+ @ Test
10
+ public void test_01 () {
11
+
12
+ //assertThrows()
13
+ assertThrows (IllegalArgumentException .class ,() ->{
14
+ CompressString .compress ("" );
15
+
16
+ });
17
+ }
18
+ @ Test
19
+ public void test_02 () {
20
+
21
+ assertEquals ("a2b" ,CompressString .compress ("aab" ));
22
+
23
+ }
24
+ @ Test
25
+ public void test_03 () {
26
+
27
+ assertEquals ("ab" ,CompressString .compress ("ab" ));
28
+
29
+ }
30
+ @ Test
31
+ public void test_04 () {
32
+
33
+ assertEquals ("abc" ,CompressString .compress ("abc" ));
34
+
35
+ }
36
+ @ Test
37
+ public void test_05 () {
38
+
39
+ assertEquals ("abc2" ,CompressString .compress ("abcc" ));
40
+
41
+ }
42
+
43
+ }
You can’t perform that action at this time.
0 commit comments