22import static org .assertj .core .api .Assertions .assertThatExceptionOfType ;
33
44import org .junit .jupiter .api .Disabled ;
5+ import org .junit .jupiter .api .DisplayName ;
56import org .junit .jupiter .api .Test ;
67
78import java .util .Arrays ;
89
910public class OpticalCharacterReaderTest {
1011
1112 @ Test
13+ @ DisplayName ("Recognizes 0" )
1214 public void testReaderRecognizesSingle0 () {
1315 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
1416 " _ " ,
@@ -23,6 +25,7 @@ public void testReaderRecognizesSingle0() {
2325
2426 @ Disabled ("Remove to run test" )
2527 @ Test
28+ @ DisplayName ("Recognizes 1" )
2629 public void testReaderRecognizesSingle1 () {
2730 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
2831 " " ,
@@ -36,6 +39,7 @@ public void testReaderRecognizesSingle1() {
3639
3740 @ Disabled ("Remove to run test" )
3841 @ Test
42+ @ DisplayName ("Unreadable but correctly sized inputs return ?" )
3943 public void testReaderReturnsQuestionMarkForUnreadableButCorrectlySizedInput () {
4044 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
4145 " " ,
@@ -49,6 +53,7 @@ public void testReaderReturnsQuestionMarkForUnreadableButCorrectlySizedInput() {
4953
5054 @ Disabled ("Remove to run test" )
5155 @ Test
56+ @ DisplayName ("Input with a number of lines that is not a multiple of four raises an error" )
5257 public void testReaderThrowsExceptionWhenNumberOfInputLinesIsNotAMultipleOf4 () {
5358
5459 assertThatExceptionOfType (IllegalArgumentException .class )
@@ -63,6 +68,7 @@ public void testReaderThrowsExceptionWhenNumberOfInputLinesIsNotAMultipleOf4() {
6368
6469 @ Disabled ("Remove to run test" )
6570 @ Test
71+ @ DisplayName ("Input with a number of columns that is not a multiple of three raises an error" )
6672 public void testReaderThrowsExceptionWhenNumberOfInputColumnsIsNotAMultipleOf3 () {
6773
6874
@@ -79,6 +85,7 @@ public void testReaderThrowsExceptionWhenNumberOfInputColumnsIsNotAMultipleOf3()
7985
8086 @ Disabled ("Remove to run test" )
8187 @ Test
88+ @ DisplayName ("Recognizes 110101100" )
8289 public void testReaderRecognizesBinarySequence110101100 () {
8390 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
8491 " _ _ _ _ " ,
@@ -92,6 +99,7 @@ public void testReaderRecognizesBinarySequence110101100() {
9299
93100 @ Disabled ("Remove to run test" )
94101 @ Test
102+ @ DisplayName ("Garbled numbers in a string are replaced with ?" )
95103 public void testReaderReplacesUnreadableDigitsWithQuestionMarksWithinSequence () {
96104 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
97105 " _ _ _ " ,
@@ -106,6 +114,7 @@ public void testReaderReplacesUnreadableDigitsWithQuestionMarksWithinSequence()
106114
107115 @ Disabled ("Remove to run test" )
108116 @ Test
117+ @ DisplayName ("Recognizes 2" )
109118 public void testReaderRecognizesSingle2 () {
110119 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
111120 " _ " ,
@@ -119,6 +128,7 @@ public void testReaderRecognizesSingle2() {
119128
120129 @ Disabled ("Remove to run test" )
121130 @ Test
131+ @ DisplayName ("Recognizes 3" )
122132 public void testReaderRecognizesSingle3 () {
123133 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
124134 " _ " ,
@@ -132,6 +142,7 @@ public void testReaderRecognizesSingle3() {
132142
133143 @ Disabled ("Remove to run test" )
134144 @ Test
145+ @ DisplayName ("Recognizes 4" )
135146 public void testReaderRecognizesSingle4 () {
136147 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
137148 " " ,
@@ -145,6 +156,7 @@ public void testReaderRecognizesSingle4() {
145156
146157 @ Disabled ("Remove to run test" )
147158 @ Test
159+ @ DisplayName ("Recognizes 5" )
148160 public void testReaderRecognizesSingle5 () {
149161 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
150162 " _ " ,
@@ -158,6 +170,7 @@ public void testReaderRecognizesSingle5() {
158170
159171 @ Disabled ("Remove to run test" )
160172 @ Test
173+ @ DisplayName ("Recognizes 6" )
161174 public void testReaderRecognizesSingle6 () {
162175 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
163176 " _ " ,
@@ -171,6 +184,7 @@ public void testReaderRecognizesSingle6() {
171184
172185 @ Disabled ("Remove to run test" )
173186 @ Test
187+ @ DisplayName ("Recognizes 7" )
174188 public void testReaderRecognizesSingle7 () {
175189 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
176190 " _ " ,
@@ -184,6 +198,7 @@ public void testReaderRecognizesSingle7() {
184198
185199 @ Disabled ("Remove to run test" )
186200 @ Test
201+ @ DisplayName ("Recognizes 8" )
187202 public void testReaderRecognizesSingle8 () {
188203 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
189204 " _ " ,
@@ -197,6 +212,7 @@ public void testReaderRecognizesSingle8() {
197212
198213 @ Disabled ("Remove to run test" )
199214 @ Test
215+ @ DisplayName ("Recognizes 9" )
200216 public void testReaderRecognizesSingle9 () {
201217 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
202218 " _ " ,
@@ -210,6 +226,7 @@ public void testReaderRecognizesSingle9() {
210226
211227 @ Disabled ("Remove to run test" )
212228 @ Test
229+ @ DisplayName ("Recognizes string of decimal numbers" )
213230 public void testReaderRecognizesSequence1234567890 () {
214231 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
215232 " _ _ _ _ _ _ _ _ " ,
@@ -223,6 +240,7 @@ public void testReaderRecognizesSequence1234567890() {
223240
224241 @ Disabled ("Remove to run test" )
225242 @ Test
243+ @ DisplayName ("Numbers separated by empty lines are recognized. Lines are joined by commas." )
226244 public void testReaderRecognizesAndCorrectlyFormatsMultiRowInput () {
227245 String parsedInput = new OpticalCharacterReader ().parse (Arrays .asList (
228246 " _ _ " ,
0 commit comments