Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Test3c.java 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Common Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/cpl-v10.html
  8. *
  9. * Contributors:
  10. * PARC initial implementation
  11. * ******************************************************************/
  12. package tests;
  13. import figures.*;
  14. import support.Log;
  15. import junit.framework.*;
  16. public class Test3c extends Test {
  17. public Test3c(String name) { super(name); }
  18. public static void main(String[] args) {
  19. junit.textui.TestRunner.run(Test3c.class);
  20. }
  21. public void setUp() {
  22. Log.clear();
  23. super.setUp();
  24. }
  25. public void testCreateLog() {
  26. assertEquals("", Log.getString());
  27. }
  28. public void testMoveLonePoint() {
  29. p1 = new Point(0, 0);
  30. p1.move(37, 88);
  31. assertEquals("moving as a part of null;", Log.getString());
  32. }
  33. public void testMoveGroupedPoint() {
  34. g = new Group(p1);
  35. p1.move(0, 0);
  36. assertEquals("moving as a part of " + g + ";", Log.getString());
  37. }
  38. }