Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 junit.framework.*;
  15. public class Test2g extends Test {
  16. public Test2g(String name) { super(name); }
  17. public static void main(String[] args) {
  18. junit.textui.TestRunner.run(Test2g.class);
  19. }
  20. public void setUp() {
  21. super.setUp();
  22. }
  23. public void testBounds() {
  24. p1.setX(FigureElement.MAX_VALUE + 1);
  25. assertEquals(FigureElement.MAX_VALUE, p1.getX());
  26. p1.setY(FigureElement.MIN_VALUE - 1);
  27. assertEquals(FigureElement.MIN_VALUE, p1.getY());
  28. }
  29. public void testBox() {
  30. Box s = new Box(50, 50, 20000, 20000);
  31. assertEquals(FigureElement.MAX_VALUE, s.getP2().getX());
  32. assertEquals(FigureElement.MAX_VALUE, s.getP2().getY());
  33. }
  34. }