diff options
author | ehilsdal <ehilsdal> | 2003-08-28 17:34:03 +0000 |
---|---|---|
committer | ehilsdal <ehilsdal> | 2003-08-28 17:34:03 +0000 |
commit | 8266a6c5d3b1d2a3e72a2f7c3b6b1b287cacc520 (patch) | |
tree | baf606d2f6457c16221a348210341f16877a4e41 /docs/teaching/exercises/tests/Test3c.java | |
parent | c19c596d276457bb01d6f9e48311a6e3e290c7b4 (diff) | |
download | aspectj-8266a6c5d3b1d2a3e72a2f7c3b6b1b287cacc520.tar.gz aspectj-8266a6c5d3b1d2a3e72a2f7c3b6b1b287cacc520.zip |
made everything inherit from Test again
updated section 3 tests
Diffstat (limited to 'docs/teaching/exercises/tests/Test3c.java')
-rw-r--r-- | docs/teaching/exercises/tests/Test3c.java | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/docs/teaching/exercises/tests/Test3c.java b/docs/teaching/exercises/tests/Test3c.java index a8d888366..b410905e0 100644 --- a/docs/teaching/exercises/tests/Test3c.java +++ b/docs/teaching/exercises/tests/Test3c.java @@ -14,8 +14,9 @@ package tests; import figures.*; import support.Log; - import junit.framework.*; +import java.util.List; +import java.util.Arrays; public class Test3c extends Test { @@ -23,24 +24,29 @@ public class Test3c extends Test { junit.textui.TestRunner.run(Test3c.class); } - public void setUp() { + public void testCreateWithPointLog() { Log.clear(); - super.setUp(); - } - - public void testCreateLog() { - assertEquals("", Log.getString()); + Point p1 = new Point(10, 100); + Group g = new Group(p1); + List foundLog = Log.getData(); + + List desiredLog = + Arrays.asList(new String[] { + "adding Point" + }); + assertEquals(desiredLog, foundLog); } - public void testMoveLonePoint() { - p1 = new Point(0, 0); - p1.move(37, 88); - assertEquals("moving as a part of null;", Log.getString()); - } - - public void testMoveGroupedPoint() { - g = new Group(p1); - p1.move(0, 0); - assertEquals("moving as a part of " + g + ";", Log.getString()); + public void testCreateWithoutPointLog() { + Log.clear(); + Point p1 = new Point(10, 100); + Point p2 = new Point(20, 200); + Line l = new Line(p1, p2); + Group g = new Group(l); + List foundLog = Log.getData(); + + List desiredLog = Arrays.asList(new String[] {}); + assertEquals(desiredLog, foundLog); } } + |