Package de.gamobi.jkariam.tests

Source Code of de.gamobi.jkariam.tests.BuildingTest

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");
  }

}
TOP

Related Classes of de.gamobi.jkariam.tests.BuildingTest

TOP
Copyright © 2018 www.massapi.com. 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.