44
55import org .junit .Assert ;
66import org .junit .Test ;
7+ import org .teachingextensions .logo .Pizza ;
8+ import org .teachingextensions .logo .Topping ;
79import org .teachingextensions .logo .Tortoise ;
810import org .teachingextensions .logo .Turtle ;
911import org .teachingextensions .logo .Turtle .Animals ;
@@ -78,6 +80,17 @@ public void explodingTurtle() throws Exception
7880 this .donatello .setAnimal (Animals .ExplodedTurtle );
7981 Assert .assertTrue ("The ninja is still alive!" , ninja .isDead ());
8082 }
83+ //fix comparitor
84+ @ Test
85+ public void feedTheNinja () throws Exception
86+ {
87+ Tortoise michealangelo = new Tortoise ();
88+ michealangelo .likesTopping (Topping .Pepperoni );
89+ Pizza pizza = new Pizza ();
90+ pizza .addTopping (_________ );
91+ boolean likedIt = michealangelo .eatPizza (pizza );
92+ Assert .assertTrue ("Michealangelo barfs! Wrong pizza!" , likedIt );
93+ }
8194 /**
8295 * Ignore the following, It's needed to run the homework
8396 *
@@ -91,12 +104,13 @@ public void explodingTurtle() throws Exception
91104 *
92105 *
93106 */
94- public boolean _____ = false ;
95- public boolean ______ = true ;
96- public String ___ = "You need to fill in the blank ___" ;
97- public int ____ = 0 ;
98- public Turtle _______ = new Turtle ();
107+ public boolean _____ = false ;
108+ public boolean ______ = true ;
109+ public String ___ = "You need to fill in the blank ___" ;
110+ public int ____ = 0 ;
111+ public Turtle _______ = new Turtle ();
99112 public Tortoise ________ ;
113+ public Topping _________ = Topping .NoTopping ;
100114 public String ___ ()
101115 {
102116 return ___ ;
0 commit comments