use of soc.game.SOCResourceSet in project JSettlers2 by jdmonin.
the class TestResourceSet method removeAll_yieldsEmptyResourceSet.
@Test
public void removeAll_yieldsEmptyResourceSet() {
SOCResourceSet rs = onePerType();
rs.subtract(1, SOCResourceConstants.CLAY);
rs.subtract(1, SOCResourceConstants.WHEAT);
rs.subtract(1, SOCResourceConstants.WOOD);
rs.subtract(1, SOCResourceConstants.ORE);
rs.subtract(1, SOCResourceConstants.SHEEP);
assertEquals(0, rs.getTotal());
}
use of soc.game.SOCResourceSet in project JSettlers2 by jdmonin.
the class TestResourceSet method clone_isContained.
@Test
public void clone_isContained() {
SOCResourceSet rs1 = onePerType();
SOCResourceSet rs2 = onePerType();
assertTrue(rs1.contains(rs2));
}
use of soc.game.SOCResourceSet in project JSettlers2 by jdmonin.
the class TestResourceSet method clear_yieldsEmptyResourceSet.
@Test
public void clear_yieldsEmptyResourceSet() {
SOCResourceSet rs = onePerType();
rs.clear();
assertEquals(0, rs.getTotal());
}
use of soc.game.SOCResourceSet in project JSettlers2 by jdmonin.
the class TestResourceSet method removeOneResource_removesOneResource.
@Test
public void removeOneResource_removesOneResource() {
SOCResourceSet rs = onePerType();
rs.subtract(1, SOCResourceConstants.ORE);
assertEquals(4, rs.getTotal());
}
use of soc.game.SOCResourceSet in project JSettlers2 by jdmonin.
the class TestResourceSet method total_test.
@Test
public void total_test() {
SOCResourceSet rs = onePerType();
assertEquals(5, rs.getTotal());
}
Aggregations