1
1
import org .junit .jupiter .api .Disabled ;
2
+ import org .junit .jupiter .api .DisplayName ;
2
3
import org .junit .jupiter .api .Test ;
3
4
4
5
import java .util .Arrays ;
11
12
public class SeriesTest {
12
13
13
14
@ Test
15
+ @ DisplayName ("slices of one from one" )
14
16
public void slicesOfOneFromOne () {
15
17
Series series = new Series ("1" );
16
18
List <String > expected = Collections .singletonList ("1" );
@@ -20,6 +22,7 @@ public void slicesOfOneFromOne() {
20
22
21
23
@ Disabled ("Remove to run test" )
22
24
@ Test
25
+ @ DisplayName ("slices of one from two" )
23
26
public void slicesOfOneFromTwo () {
24
27
Series series = new Series ("12" );
25
28
List <String > expected = Arrays .asList ("1" , "2" );
@@ -29,6 +32,7 @@ public void slicesOfOneFromTwo() {
29
32
30
33
@ Disabled ("Remove to run test" )
31
34
@ Test
35
+ @ DisplayName ("slices of two" )
32
36
public void slicesOfTwo () {
33
37
Series series = new Series ("35" );
34
38
List <String > expected = Collections .singletonList ("35" );
@@ -38,6 +42,7 @@ public void slicesOfTwo() {
38
42
39
43
@ Disabled ("Remove to run test" )
40
44
@ Test
45
+ @ DisplayName ("slices of two overlap" )
41
46
public void slicesOfTwoOverlap () {
42
47
Series series = new Series ("9142" );
43
48
List <String > expected = Arrays .asList ("91" , "14" , "42" );
@@ -47,6 +52,7 @@ public void slicesOfTwoOverlap() {
47
52
48
53
@ Disabled ("Remove to run test" )
49
54
@ Test
55
+ @ DisplayName ("slices can include duplicates" )
50
56
public void slicesIncludeDuplicates () {
51
57
Series series = new Series ("777777" );
52
58
List <String > expected = Arrays .asList (
@@ -61,6 +67,7 @@ public void slicesIncludeDuplicates() {
61
67
62
68
@ Disabled ("Remove to run test" )
63
69
@ Test
70
+ @ DisplayName ("slices of a long series" )
64
71
public void slicesOfLongSeries () {
65
72
Series series = new Series ("918493904243" );
66
73
List <String > expected = Arrays .asList (
@@ -79,6 +86,7 @@ public void slicesOfLongSeries() {
79
86
80
87
@ Disabled ("Remove to run test" )
81
88
@ Test
89
+ @ DisplayName ("slice length is too large" )
82
90
public void sliceLengthIsToolarge () {
83
91
Series series = new Series ("12345" );
84
92
@@ -89,6 +97,7 @@ public void sliceLengthIsToolarge() {
89
97
90
98
@ Disabled ("Remove to run test" )
91
99
@ Test
100
+ @ DisplayName ("slice length is way too large" )
92
101
public void sliceLengthIsWayToolarge () {
93
102
Series series = new Series ("12345" );
94
103
@@ -99,6 +108,7 @@ public void sliceLengthIsWayToolarge() {
99
108
100
109
@ Disabled ("Remove to run test" )
101
110
@ Test
111
+ @ DisplayName ("slice length cannot be zero" )
102
112
public void sliceLengthZero () {
103
113
Series series = new Series ("12345" );
104
114
@@ -109,6 +119,7 @@ public void sliceLengthZero() {
109
119
110
120
@ Disabled ("Remove to run test" )
111
121
@ Test
122
+ @ DisplayName ("slice length cannot be negative" )
112
123
public void sliceLengthNegative () {
113
124
Series series = new Series ("123" );
114
125
@@ -119,6 +130,7 @@ public void sliceLengthNegative() {
119
130
120
131
@ Disabled ("Remove to run test" )
121
132
@ Test
133
+ @ DisplayName ("empty series is invalid" )
122
134
public void emptySeries () {
123
135
124
136
assertThatExceptionOfType (IllegalArgumentException .class )
0 commit comments