11import org .junit .jupiter .api .Disabled ;
2+ import org .junit .jupiter .api .DisplayName ;
23import org .junit .jupiter .api .Test ;
34
45import java .util .Arrays ;
1112public class SeriesTest {
1213
1314 @ Test
15+ @ DisplayName ("slices of one from one" )
1416 public void slicesOfOneFromOne () {
1517 Series series = new Series ("1" );
1618 List <String > expected = Collections .singletonList ("1" );
@@ -20,6 +22,7 @@ public void slicesOfOneFromOne() {
2022
2123 @ Disabled ("Remove to run test" )
2224 @ Test
25+ @ DisplayName ("slices of one from two" )
2326 public void slicesOfOneFromTwo () {
2427 Series series = new Series ("12" );
2528 List <String > expected = Arrays .asList ("1" , "2" );
@@ -29,6 +32,7 @@ public void slicesOfOneFromTwo() {
2932
3033 @ Disabled ("Remove to run test" )
3134 @ Test
35+ @ DisplayName ("slices of two" )
3236 public void slicesOfTwo () {
3337 Series series = new Series ("35" );
3438 List <String > expected = Collections .singletonList ("35" );
@@ -38,6 +42,7 @@ public void slicesOfTwo() {
3842
3943 @ Disabled ("Remove to run test" )
4044 @ Test
45+ @ DisplayName ("slices of two overlap" )
4146 public void slicesOfTwoOverlap () {
4247 Series series = new Series ("9142" );
4348 List <String > expected = Arrays .asList ("91" , "14" , "42" );
@@ -47,6 +52,7 @@ public void slicesOfTwoOverlap() {
4752
4853 @ Disabled ("Remove to run test" )
4954 @ Test
55+ @ DisplayName ("slices can include duplicates" )
5056 public void slicesIncludeDuplicates () {
5157 Series series = new Series ("777777" );
5258 List <String > expected = Arrays .asList (
@@ -61,6 +67,7 @@ public void slicesIncludeDuplicates() {
6167
6268 @ Disabled ("Remove to run test" )
6369 @ Test
70+ @ DisplayName ("slices of a long series" )
6471 public void slicesOfLongSeries () {
6572 Series series = new Series ("918493904243" );
6673 List <String > expected = Arrays .asList (
@@ -79,6 +86,7 @@ public void slicesOfLongSeries() {
7986
8087 @ Disabled ("Remove to run test" )
8188 @ Test
89+ @ DisplayName ("slice length is too large" )
8290 public void sliceLengthIsToolarge () {
8391 Series series = new Series ("12345" );
8492
@@ -89,6 +97,7 @@ public void sliceLengthIsToolarge() {
8997
9098 @ Disabled ("Remove to run test" )
9199 @ Test
100+ @ DisplayName ("slice length is way too large" )
92101 public void sliceLengthIsWayToolarge () {
93102 Series series = new Series ("12345" );
94103
@@ -99,6 +108,7 @@ public void sliceLengthIsWayToolarge() {
99108
100109 @ Disabled ("Remove to run test" )
101110 @ Test
111+ @ DisplayName ("slice length cannot be zero" )
102112 public void sliceLengthZero () {
103113 Series series = new Series ("12345" );
104114
@@ -109,6 +119,7 @@ public void sliceLengthZero() {
109119
110120 @ Disabled ("Remove to run test" )
111121 @ Test
122+ @ DisplayName ("slice length cannot be negative" )
112123 public void sliceLengthNegative () {
113124 Series series = new Series ("123" );
114125
@@ -119,6 +130,7 @@ public void sliceLengthNegative() {
119130
120131 @ Disabled ("Remove to run test" )
121132 @ Test
133+ @ DisplayName ("empty series is invalid" )
122134 public void emptySeries () {
123135
124136 assertThatExceptionOfType (IllegalArgumentException .class )
0 commit comments