@Test public void testIsInsideShouldNotBeInside() throws Exception { BaseElement baseElement = createBaseElement(); baseElement.setX(42); baseElement.setY(42); baseElement.setHeight(1); baseElement.setWidth(1); BaseElement baseElementInside = createBaseElement(); baseElementInside.setX(50); baseElementInside.setY(50); baseElementInside.setHeight(3); baseElementInside.setWidth(3); assertFalse(baseElementInside.isInside(baseElement)); }
@Test public void testMove() throws Exception { BaseElement baseElement = createBaseElement(); baseElement.setX(42); baseElement.setY(42); baseElement.setVx(1); baseElement.setVy(-1); baseElement.move(); assertEquals(baseElement.getX(), 43); assertEquals(baseElement.getY(), 41); }