@Test public void testScale() { System.out.println("Scale"); BoundingBox instance = new BoundingBox(new Vector2(-0.5, -0.5), 1, 1); System.out.println(instance.getCenter().getX()); System.out.println(instance.getCenter().getY()); instance.scale(2, 2); Vector2 center = instance.getCenter(); assertEquals(0.0, center.getX(), 0.0); assertEquals(0.0, center.getY(), 0.0); }
@Test public void testMove() { System.out.println("Move"); BoundingBox instance = new BoundingBox(); instance.move(1, 1); Vector2 center = instance.getCenter(); assertEquals(1.5, center.getX(), 0.0); assertEquals(1.5, center.getY(), 0.0); }
@Test public void testGetCenter() { System.out.println("getCenter"); BoundingBox instance = new BoundingBox(); Vector2 expected = new Vector2(0.5, 0.5); Vector2 center = instance.getCenter(); assertEquals(expected.getX(), center.getX(), 0.0); assertEquals(expected.getY(), center.getY(), 0.0); }