/** * Testet setDrawn * * @throws PolygonShapeException */ @Test public void testSetDrawn() throws PolygonShapeException { // Einize Punkte hinzufügen, da sonst nichts gezeichnet werden kann ArrayList<Point> points = new ArrayList<Point>(); points.add(new Point(3, 1)); points.add(new Point(5, 5)); points.add(new Point(-2, 4)); poly.setPoints(points); // Nicht zeichnen poly.setDrawn(false); poly.draw(); assertNull(poly.representation); assertEquals(poly.getDrawn(), false); // Nochmal zeichnen poly.setDrawn(true); poly.draw(); assertNotNull(poly.representation); assertEquals(poly.getDrawn(), true); }
/** Testet getDrawn auf den Standard-Rückgabewert */ @Test public void testDefaultDrawn() { assertEquals(poly.getDrawn(), Shape.DEFAULT_DRAWN); }