Skip to content

Commit 8871cec

Browse files
committed
working on DeepDive08
1 parent 3667537 commit 8871cec

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/main/java/org/teachingkidsprogramming/recipes/completed/section08events/DeepDive08Events.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public void twoCircles() throws Exception
2525
Circle c1 = new Circle(20, PenColors.Blues.Blue);
2626
Circle c2 = new Circle(20, PenColors.Blues.Blue);
2727
boolean result = c1.equals(c2);
28+
// shows object instances are NOT equivalent
2829
Assert.assertEquals(____, result);
2930
}
3031
@Test
@@ -33,7 +34,17 @@ public void twoCirclesAgain() throws Exception
3334
Circle c1 = new Circle(20, PenColors.Blues.Blue);
3435
Circle c2 = new Circle(20, PenColors.Blues.Blue);
3536
boolean result = c2.equals(c1);
36-
Assert.assertNotSame(_____, result);
37+
// shows use of different type of assert statement
38+
Assert.assertNotSame(____, result);
39+
}
40+
@Test
41+
public void twoCirclesYetAgain() throws Exception
42+
{
43+
Circle c1 = new Circle(20, PenColors.Blues.Aqua);
44+
Circle c2 = new Circle(20, PenColors.Blues.Blue);
45+
Circle result = c1;
46+
// use 'c1' (correct) or 'c2' (incorrect), shows object instance unique value
47+
Assert.assertEquals(____, result);
3748
}
3849
@Test
3950
public void isItClicked() throws Exception

0 commit comments

Comments
 (0)