Package de.gamobi.jkariam.core

Examples of de.gamobi.jkariam.core.City


      if(cityName == null) {
        return;
      }
    }
   
    City city;
    try {
      city = City.createNewCity(this.account.getPlayer(), cityName);
    } catch (Exception e) {
      e.printStackTrace();
      return;
View Full Code Here


public class CityTest {
 
  @Test
  public void loadAttributeTest() throws JDOMException, IOException {
    File cityFile = new File("tests" + File.separator + "00 - Testcity.xml");
    City city = new City(cityFile, true);
    city.loadAttributes();
   
    assertEquals("00", city.getId());
    assertEquals("Test City", city.getName());
    assertEquals(01, city.getPosition().getxPosition());
    assertEquals(99, city.getPosition().getyPosition());
    assertEquals(3322, city.getTotalPopulation());
    assertEquals(723, city.getWorker());
    assertEquals(735, city.getMiner());
    assertEquals(134, city.getScientists());
    assertEquals(0, city.getPriests());
  }
View Full Code Here

  }

  @Test
  public void loadBuildingsTest() throws JDOMException, IOException {
    File cityFile = new File("tests" + File.separator + "00 - Testcity.xml");
    City city = new City(cityFile, true);
    city.loadBuildings();
   
    assertEquals(27, city.getBuildings().size());
    assertEquals("Akademie", city.getBuildings().get(0).getName());
    assertEquals("Zimmerei", city.getBuildings().get(26).getName());
  }
View Full Code Here

TOP

Related Classes of de.gamobi.jkariam.core.City

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.