Skip to content

Commit 11bb6fd

Browse files
committed
working on DD8
1 parent ef6ae0f commit 11bb6fd

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed
0 Bytes
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/section08tdd/DeepDive08TDD.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
package org.teachingkidsprogramming.section08tdd;
22

3-
import java.awt.Color;
43
import java.awt.Cursor;
54

65
import org.junit.Assert;
76
import org.junit.Test;
87
import org.teachingextensions.logo.Tortoise;
9-
//This deepdive is in progress!
108

11-
//
9+
//This deepdive is in progress!
1210
public class DeepDive08TDD
1311
{
1412
// How to do deep dive:
15-
// Step 1: Select the method name (doesABear on line 20) Press the Run Button
13+
// Step 1: Select the method name (stringsCanBeArrays on line XX) Press the Run Button
1614
// PC: Ctrl+F11
1715
// Mac: Command+fn+F11
1816
// Step 2: Read the name of the method that failed
@@ -32,6 +30,15 @@ public void stringsCanBeArrays() throws Exception
3230
String result = words[0] + words[1];
3331
Assert.assertEquals("happy baby", result);
3432
}
33+
@Test
34+
public void stringsCanBePartOfStringBuilder() throws Exception
35+
{
36+
StringBuilder sb = new StringBuilder();
37+
sb.append("happy");
38+
sb.append(" baby");
39+
String result = sb.toString();
40+
Assert.assertEquals("happy baby", ___);
41+
}
3542
/**
3643
* Ignore the following, It's needed to run the homework
3744
*
@@ -49,7 +56,6 @@ public void stringsCanBeArrays() throws Exception
4956
public boolean ______ = true;
5057
public String ___ = "You need to fill in the blank ___";
5158
public int ____ = 0;
52-
public Color _______;
5359
public String ___()
5460
{
5561
return ___;

0 commit comments

Comments
 (0)