3
3
4
4
import java .util .List ;
5
5
import org .junit .jupiter .api .Disabled ;
6
+ import org .junit .jupiter .api .DisplayName ;
6
7
import org .junit .jupiter .api .Test ;
7
8
8
9
public class SatelliteTest {
9
10
Satellite satellite = new Satellite ();
10
11
11
12
@ Test
13
+ @ DisplayName ("Empty tree" )
12
14
public void emptyTree () {
13
15
List <Character > preorder = List .of ();
14
16
List <Character > inorder = List .of ();
@@ -22,6 +24,7 @@ public void emptyTree() {
22
24
23
25
@ Disabled ("Remove to run test" )
24
26
@ Test
27
+ @ DisplayName ("Tree with one item" )
25
28
public void treeWithOneItem () {
26
29
List <Character > preorder = List .of ('a' );
27
30
List <Character > inorder = List .of ('a' );
@@ -35,6 +38,7 @@ public void treeWithOneItem() {
35
38
36
39
@ Disabled ("Remove to run test" )
37
40
@ Test
41
+ @ DisplayName ("Tree with many items" )
38
42
public void treeWithManyItems () {
39
43
List <Character > preorder = List .of ('a' , 'i' , 'x' , 'f' , 'r' );
40
44
List <Character > inorder = List .of ('i' , 'a' , 'f' , 'x' , 'r' );
@@ -48,6 +52,7 @@ public void treeWithManyItems() {
48
52
49
53
@ Disabled ("Remove to run test" )
50
54
@ Test
55
+ @ DisplayName ("Reject traversals of different length" )
51
56
public void rejectTraversalsOfDifferentLengths () {
52
57
List <Character > preorder = List .of ('a' , 'b' );
53
58
List <Character > inorder = List .of ('b' , 'a' , 'r' );
@@ -60,6 +65,7 @@ public void rejectTraversalsOfDifferentLengths() {
60
65
61
66
@ Disabled ("Remove to run test" )
62
67
@ Test
68
+ @ DisplayName ("Reject inconsistent traversals of same length" )
63
69
public void rejectInconsistentTraversalsOfSameLength () {
64
70
List <Character > preorder = List .of ('x' , 'y' , 'z' );
65
71
List <Character > inorder = List .of ('a' , 'b' , 'c' );
@@ -71,6 +77,7 @@ public void rejectInconsistentTraversalsOfSameLength() {
71
77
72
78
@ Disabled ("Remove to run test" )
73
79
@ Test
80
+ @ DisplayName ("Reject traversals with repeated items" )
74
81
public void rejectTraversalsWithRepeatedItems () {
75
82
List <Character > preorder = List .of ('a' , 'b' , 'a' );
76
83
List <Character > inorder = List .of ('b' , 'a' , 'a' );
0 commit comments