public void TestTradeWoolWithBankThrows() { var target = new Player(); target.playerHand.incrementAllResources(4); target.tradeWithBank("wool", "grain"); }
public void TestTradeWoolWithBankWithAnythingPort() { var target = new Player(); target.incrementCities(); target.incrementSettlements(); target.generateWool(); target.addPort(new Port("Anything", 3)); target.tradeWithBank("wool", "grain"); Assert.AreEqual(1, target.playerHand.getGrain()); Assert.AreEqual(0, target.playerHand.getWool()); }
public void TestTradeWithBankWithOrePort() { var target = new Player(); target.incrementCities(); target.generateWool(); target.generateOre(); target.addPort(new Port("Ore", 2)); target.tradeWithBank("ore", "wool"); Assert.AreEqual(3, target.playerHand.getWool()); Assert.AreEqual(0, target.playerHand.getOre()); }
public void TestTradeWithBankWithWoolPort() { var target = new Player(); target.incrementCities(); target.generateGrain(); target.generateWool(); target.addPort(new Port("Wool", 2)); target.tradeWithBank("wool", "grain"); Assert.AreEqual(3, target.playerHand.getGrain()); Assert.AreEqual(0, target.playerHand.getWool()); }
public void TestTradeWithBankWithGrainPort() { var target = new Player(); target.incrementCities(); target.generateBrick(); target.generateGrain(); target.addPort(new Port("Grain", 2)); target.tradeWithBank("grain", "brick"); Assert.AreEqual(3, target.playerHand.getBrick()); Assert.AreEqual(0, target.playerHand.getGrain()); }
public void TestTradeWithBankWithLumberPort() { var target = new Player(); target.incrementCities(); target.generateOre(); target.generateLumber(); target.addPort(new Port("Lumber", 2)); target.tradeWithBank("lumber", "ore"); Assert.AreEqual(3, target.playerHand.getOre()); Assert.AreEqual(0, target.playerHand.getLumber()); }
public void TestTradeWithBankThrowsWoolException() { var target = new Player(); target.tradeWithBank("wool", "lumber"); }
public void TestTradeWithBankForOreThrowsWhenBankHasNone() { World world = new World(); var player1 = new Player("Bob", Color.Red, world); var player2 = new Player("Jim", Color.Blue, world); player1.incrementCities(); player1.incrementCities(); player2.incrementCities(); player2.incrementCities(); player2.incrementCities(); player2.incrementCities(); player2.incrementSettlements(); player2.generateOre(); player2.incrementSettlements(); player2.generateOre(); Assert.AreEqual(0, world.bank.getOreRemaining()); player1.generateLumber(); player1.tradeWithBank("lumber", "ore"); }
public void TestTradeWithBankThrowsLumberException() { var target = new Player(); target.tradeWithBank("lumber", "grain"); }
public void TestTradeWithBankThrowsOreException() { var target = new Player(); target.tradeWithBank("ore", "wool"); }
public void TestTradeWithBankThrowsGrainException() { var target = new Player(); target.tradeWithBank("grain", "brick"); }
public void TestTradeWithBankThrowsBrickException() { var target = new Player(); target.tradeWithBank("brick", "ore"); }
public void TestTradeWithBankForWoolThrowsWhenBankHasNone() { World world = new World(); var player1 = new Player("Bob", Color.Red, world); var player2 = new Player("Jim", Color.Blue, world); player1.incrementCities(); player1.incrementCities(); player2.incrementCities(); player2.incrementCities(); player2.incrementCities(); player2.incrementCities(); player2.incrementSettlements(); player2.generateWool(); player2.incrementSettlements(); player2.generateWool(); Assert.AreEqual(0, world.bank.getWoolRemaining()); player1.generateBrick(); player1.tradeWithBank("brick", "wool"); }
public void TestTradeBrickWithBankThrows() { var target = new Player(); target.playerHand.incrementAllResources(4); target.tradeWithBank("brick", "lumber"); }
public void TestTradeWithBankWithBrickPort() { var target = new Player(); target.incrementCities(); target.generateLumber(); target.generateBrick(); target.addPort(new Port("Brick", 2)); target.tradeWithBank("brick", "lumber"); Assert.AreEqual(3, target.playerHand.getLumber()); Assert.AreEqual(0, target.playerHand.getBrick()); }
public void TestTradeBrickWithBankWithAnythingPort() { var target = new Player(); target.incrementCities(); target.incrementSettlements(); target.generateBrick(); target.addPort(new Port("Anything", 3)); target.tradeWithBank("brick", "lumber"); Assert.AreEqual(1, target.playerHand.getLumber()); Assert.AreEqual(0, target.playerHand.getBrick()); }
public void TestTradeWithBank() { var target = new Player(); target.incrementCities(); target.incrementCities(); target.generateBrick(); target.generateGrain(); target.generateLumber(); target.generateOre(); target.generateWool(); target.tradeWithBank("grain", "brick"); target.tradeWithBank("lumber", "grain"); target.tradeWithBank("ore", "lumber"); target.tradeWithBank("wool", "ore"); target.tradeWithBank("brick", "wool"); Assert.AreEqual(1, target.getHand().getGrain()); Assert.AreEqual(1, target.getHand().getLumber()); Assert.AreEqual(1, target.getHand().getOre()); Assert.AreEqual(1, target.getHand().getWool()); Assert.AreEqual(1, target.getHand().getBrick()); }