package de.gamobi.jkariam.tests;
import static org.junit.Assert.*;
import java.io.IOException;
import org.jdom.JDOMException;
import org.junit.Test;
import de.gamobi.jkariam.core.Building;
import de.gamobi.jkariam.exceptions.BuildingNotFoundException;
public class BuildingTest {
@Test
public void akademieTest() {
try {
Building akademie = new Building("Akademie");
assertEquals(-1, akademie.getMaxLevel());
assertEquals(0, akademie.getLevel());
assertEquals(1, akademie.getWoodBonus(), 0);
assertEquals(1, akademie.getLuxusBonus(), 0);
} catch (BuildingNotFoundException e) {
assertTrue(false);
e.printStackTrace();
} catch (JDOMException e) {
assertTrue(false);
e.printStackTrace();
} catch (IOException e) {
assertTrue(false);
e.printStackTrace();
}
}
@Test(expected = BuildingNotFoundException.class)
public void buildingNotFoundExceptionTest() throws JDOMException, IOException, BuildingNotFoundException {
new Building("WTC");
}
}