You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Test3b.java 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 Test3b extends Test {
  17. public Test3b(String name) { super(name); }
  18. public static void main(String[] args) {
  19. junit.textui.TestRunner.run(Test3b.class);
  20. }
  21. public void setUp() {
  22. super.setUp();
  23. Log.clear();
  24. }
  25. public void testCreateLog() {
  26. assertEquals("", Log.getString());
  27. }
  28. public void testCreateWithPointLog() {
  29. g = new Group(p1);
  30. assertEquals("adding Point;", Log.getString());
  31. }
  32. public void testCreateWithoutPointLog() {
  33. g = new Group(l1);
  34. assertEquals("", Log.getString());
  35. }
  36. public void testAddPointLog() {
  37. g.add(p1);
  38. assertEquals("adding Point;", Log.getString());
  39. }
  40. public void testAddNonPointLog() {
  41. g.add(l1);
  42. assertEquals("", Log.getString());
  43. }
  44. }