Viewport { public void setSizeTiles(int width, int height) { setWidthTiles(width); setHeightTiles(height); } Viewport(double width, double height, World world); boolean isOnScreen(Drawable item); int getX(); int getY(); Point getPosition(); void setPosition(int newX, int newY); void move(int offsetX, int offsetY); int getWidthTiles(); int getMaxWidthTiles(); int getWidthPixels(); int getHeightTiles(); int getMaxHeightTiles(); int getHeightPixels(); void setWidthTiles(int newWidth); void setMaxWidthTiles(int newMaxWidth); void setHeightTiles(int newHeight); void setMaxHeightTiles(int newMaxHeight); void setSizeTiles(int width, int height); void setWidthPixels(double newWidth); void setHeightPixels(double newHeight); void setMaxWidthPixels(double newMaxWidth); void setMaxHeightPixels(double newMaxHeight);  }
@Test public void testSetSizeTiles() { Viewport viewport = new Viewport( 5 * TileRegister.TILE_SIZE, 5 * TileRegister.TILE_SIZE, world ); viewport.setSizeTiles(2, 2); assertEquals("Width should be 2", 2, viewport.getWidthTiles()); assertEquals("Height should be 2", 2, viewport.getHeightTiles()); }