@Test (expected = IllegalArgumentException.class) public void testSetInvalideBackgroundColor1 () { WritableTiledMap map = new WritableTiledMap(); map.setBackgroundColor("#00"); }
public void setBackgroundColor (String bgColor) { if (!bgColor.startsWith("#")) { throw new IllegalArgumentException("background color has to start with '#'!"); } if (bgColor.length() < 7) { throw new IllegalArgumentException("background color has to min. 7 characters, e.q. '#0000FF' or '#AARRGGBB'"); } this.bgColor = bgColor; }
WritableTiledMap extends TiledMap { public void setBackgroundColor (String bgColor) { if (!bgColor.startsWith("#")) { throw new IllegalArgumentException("background color has to start with '#'!"); } if (bgColor.length() < 7) { throw new IllegalArgumentException("background color has to min. 7 characters, e.q. '#0000FF' or '#AARRGGBB'"); } this.bgColor = bgColor; } }
WritableTiledMap extends TiledMap { public void setBackgroundColor (String bgColor) { if (!bgColor.startsWith("#")) { throw new IllegalArgumentException("background color has to start with '#'!"); } if (bgColor.length() < 7) { throw new IllegalArgumentException("background color has to min. 7 characters, e.q. '#0000FF' or '#AARRGGBB'"); } this.bgColor = bgColor; }  }
WritableTiledMap extends TiledMap { public void setBackgroundColor (String bgColor) { if (!bgColor.startsWith("#")) { throw new IllegalArgumentException("background color has to start with '#'!"); } if (bgColor.length() < 7) { throw new IllegalArgumentException("background color has to min. 7 characters, e.q. '#0000FF' or '#AARRGGBB'"); } this.bgColor = bgColor; }  void setOrientation(Orientation orientation); void setDimension(int widthInTiles, int heightInTiles); void setTileDimenstion(int tileWidth, int tileHeight); void setBackgroundColor(String bgColor); void setNextLayerID(int nextLayerID); void setNextObjectID(int nextObjectID); void setTilesets(List<Tileset> tilesets); void setLayers(List<TiledLayer> layers); }
WritableTiledMap extends TiledMap { public void setBackgroundColor (String bgColor) { if (!bgColor.startsWith("#")) { throw new IllegalArgumentException("background color has to start with '#'!"); } if (bgColor.length() < 7) { throw new IllegalArgumentException("background color has to min. 7 characters, e.q. '#0000FF' or '#AARRGGBB'"); } this.bgColor = bgColor; }  void setOrientation(Orientation orientation); void setDimension(int widthInTiles, int heightInTiles); void setTileDimenstion(int tileWidth, int tileHeight); void setBackgroundColor(String bgColor); void setNextLayerID(int nextLayerID); void setNextObjectID(int nextObjectID); void setTilesets(List<Tileset> tilesets); void setLayers(List<TiledLayer> layers);  }