use of games.strategy.engine.data.UnitType in project triplea by triplea-game.
the class PacificTest method testCanLand1AirfieldStart.
@Test
public void testCanLand1AirfieldStart() {
bridge.setStepName("americanCombatMove");
final Route route = new Route();
route.setStart(unitedStates);
route.add(sz5);
route.add(sz7);
route.add(sz8);
route.add(sz20);
route.add(midway);
final IntegerMap<UnitType> map = new IntegerMap<>();
map.put(fighter, 1);
final String results = delegate.move(GameDataTestUtil.getUnits(map, route.getStart()), route);
assertValid(results);
// assertError( results);
}
use of games.strategy.engine.data.UnitType in project triplea by triplea-game.
the class PacificTest method testCanLand1AirfieldEnd.
@Test
public void testCanLand1AirfieldEnd() {
bridge.setStepName("americanCombatMove");
final Route route = new Route();
route.setStart(unitedStates);
route.add(sz5);
route.add(sz7);
route.add(sz8);
route.add(sz20);
route.add(midway);
final IntegerMap<UnitType> map = new IntegerMap<>();
map.put(fighter, 1);
final String results = delegate.move(GameDataTestUtil.getUnits(map, route.getStart()), route);
assertValid(results);
}
use of games.strategy.engine.data.UnitType in project triplea by triplea-game.
the class PacificTest method testCanLand2Airfields.
@Test
public void testCanLand2Airfields() {
bridge.setStepName("americanCombatMove");
final Route route = new Route();
route.setStart(unitedStates);
route.add(sz5);
route.add(sz4);
route.add(sz10);
route.add(sz16);
route.add(sz27);
route.add(newBritain);
final IntegerMap<UnitType> map = new IntegerMap<>();
map.put(fighter, 1);
final String results = delegate.move(GameDataTestUtil.getUnits(map, route.getStart()), route);
assertValid(results);
}
use of games.strategy.engine.data.UnitType in project triplea by triplea-game.
the class PlaceDelegateTest method testCanNotProduceThatManyUnits.
@Test
public void testCanNotProduceThatManyUnits() {
final IntegerMap<UnitType> map = new IntegerMap<>();
map.add(infantry, 3);
final PlaceableUnits response = delegate.getPlaceableUnits(GameDataTestUtil.getUnits(map, british), westCanada);
assertTrue(response.getMaxUnits() == 2);
}
use of games.strategy.engine.data.UnitType in project triplea by triplea-game.
the class PlaceDelegateTest method testCanProduceInSea.
@Test
public void testCanProduceInSea() {
final IntegerMap<UnitType> map = new IntegerMap<>();
map.add(transport, 2);
final PlaceableUnits response = delegate.getPlaceableUnits(GameDataTestUtil.getUnits(map, british), northSea);
assertFalse(response.isError());
}
Aggregations