@Test public void canReturnAPercentageFromAPositionY() { gameWindow.setDimension(100, 200); gameWindow.setPosition(50, 60); assertThat(gameWindow.getPercentageY(99)).isEqualTo((99 - 60) / (float) 200); }
@Test public void canReturnAPositionYFromAPercentage() { gameWindow.setDimension(100, 200); gameWindow.setPosition(50, 60); assertThat(gameWindow.getPositionY(0.2f)).isEqualTo((int) (60 + 200 * 0.2f)); }
@Test public void canChangePositionOfGameWindow() { gameWindow.setPosition(50, 130); assertThat(gameWindow.x).isEqualTo(50); assertThat(gameWindow.y).isEqualTo(130); }
@Test public void canModifyDimensionOfAnExistingGameWindow() { gameWindow.setDimension(300, 10); assertThat(gameWindow.getWidth()).isEqualTo(300); assertThat(gameWindow.getHeight()).isEqualTo(10); }
@Test public void canRetrieveHeightOfAGameWindow() { assertThat(gameWindow.getHeight()).isEqualTo(200); }
@Test public void canRetrieveWithOfAGameWindow() { assertThat(gameWindow.getWidth()).isEqualTo(100); }