@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 canReturnAPercentageFromAPositionY() { gameWindow.setDimension(100, 200); gameWindow.setPosition(50, 60); assertThat(gameWindow.getPercentageY(99)).isEqualTo((99 - 60) / (float) 200); }
@Test public void canModifyDimensionOfAnExistingGameWindow() { gameWindow.setDimension(300, 10); assertThat(gameWindow.getWidth()).isEqualTo(300); assertThat(gameWindow.getHeight()).isEqualTo(10); }