diff options
Diffstat (limited to 'docs/teaching/exercises/tests/Test4b.java')
-rw-r--r-- | docs/teaching/exercises/tests/Test4b.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/docs/teaching/exercises/tests/Test4b.java b/docs/teaching/exercises/tests/Test4b.java index 31bea5209..adc891008 100644 --- a/docs/teaching/exercises/tests/Test4b.java +++ b/docs/teaching/exercises/tests/Test4b.java @@ -18,17 +18,10 @@ import java.awt.Rectangle; import junit.framework.*; public class Test4b extends Test { - - public Test4b(String name) { super(name); } - public static void main(String[] args) { junit.textui.TestRunner.run(Test4b.class); } - public void setUp() { - super.setUp(); - } - public void testBasicEquality() { assertTrue(g.getBounds() == g.getBounds()); } @@ -58,12 +51,9 @@ public class Test4b extends Test { public void testNotWholeCanvas() { assertTrue("bounds for this group should not be the whole canvas", - g.getBounds().getWidth() < - (FigureElement.MAX_VALUE - FigureElement.MIN_VALUE)); + g.getBounds().getWidth() < FigureElement.MAX_BOUNDS.getWidth()); assertTrue("bounds for this group should not be the whole canvas", - g.getBounds().getHeight() < - (FigureElement.MAX_VALUE - FigureElement.MIN_VALUE)); - + g.getBounds().getHeight() < FigureElement.MAX_BOUNDS.getHeight()); } } |