File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
TeachingKidsProgramming/src
org/teachingkidsprogramming/section08tdd Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ public void stringsCanBeReversedInStringBuilder() throws Exception
5656 String result = sb .toString ();
5757 Assert .assertEquals (___ , result );
5858 }
59+ @ Test
60+ public void numbersCanBeStrings () throws Exception
61+ {
62+ StringBuilder sb = new StringBuilder ();
63+ for (int i = 97 ; i <= 99 ; i ++)
64+ {
65+ sb .append (convertArray (i ));
66+ }
67+ String result = sb .toString ();
68+ Assert .assertEquals (___ , result );
69+ }
5970 /**
6071 * Ignore the following, It's needed to run the homework
6172 *
@@ -82,4 +93,8 @@ private Cursor getCursor()
8293 Cursor cursor = Tortoise .getBackgroundWindow ().getCursor ();
8394 return cursor ;
8495 }
96+ public static String convertArray (int i )
97+ {
98+ return " " + i ;
99+ }
85100}
You can’t perform that action at this time.
0 commit comments