Ejemplo n.º 1
0
 @Test
 public void equalsTest() {
   Point point1 = new Point(5.0, 3.2);
   Point point2 = new Point(5.0, 3.2);
   Circle circle1 = new Circle(point1, 1.0);
   Circle circle2 = new Circle(point2, 1.0);
   assertEquals("failure - circle didn't match", true, circle1.equals(circle2));
 }
Ejemplo n.º 2
0
 @Test
 public void translateTest() {
   Point point1 = new Point(5.0, 3.2);
   Point point2 = new Point(1.0, 12.0);
   Circle circle1 = new Circle(point1, 1.0);
   Circle circle2 = new Circle(point2, 1.0);
   circle2.translate(point1);
   assertEquals("failure - does not translate to given point", true, circle1.equals(circle2));
 }