Ejemplo n.º 1
0
 public void TestRemoveYearOfPlentyThrowsWhenPlayerHasNoYearOfPlentyCards()
 {
     var target = new Hand();
     target.removeDevCard("yearOfPlenty");
 }
Ejemplo n.º 2
0
        public void TestDevCardsContainsReturnsFalseWhenCardIsNotInHand()
        {
            var target = new Hand();

            List<DevelopmentCard> knight = new List<DevelopmentCard>();
            knight.Add(new Knight());
            target.addDevCard(knight);
            Assert.IsFalse(target.devCardsContains("monopoly"));

            List<DevelopmentCard> monopoly = new List<DevelopmentCard>();
            monopoly.Add(new MonopolyCard());
            target.addDevCard(monopoly);
            Assert.IsFalse(target.devCardsContains("victoryPoint"));

            List<DevelopmentCard> victoryPoint = new List<DevelopmentCard>();
            victoryPoint.Add(new VictoryPointCard());
            target.addDevCard(victoryPoint);
            Assert.IsFalse(target.devCardsContains("roadBuilder"));

            List<DevelopmentCard> roadBuilder = new List<DevelopmentCard>();
            roadBuilder.Add(new RoadBuilderCard());
            target.addDevCard(roadBuilder);
            Assert.IsFalse(target.devCardsContains("yearOfPlenty"));

            List<DevelopmentCard> yearOfPlenty = new List<DevelopmentCard>();
            yearOfPlenty.Add(new YearOfPlentyCard());
            target.addDevCard(yearOfPlenty);

            target.removeDevCard("knight");
            Assert.IsFalse(target.devCardsContains("knight"));
        }
Ejemplo n.º 3
0
 public void TestRemoveVictoryPointThrowsWhenPlayerHasNoVictoryPointCards()
 {
     var target = new Hand();
     target.removeDevCard("victoryPoint");
 }
Ejemplo n.º 4
0
 public void TestRemoveRoadBuilderThrowsWhenPlayerHasNoRoadBuilderCards()
 {
     var target = new Hand();
     target.removeDevCard("roadBuilder");
 }
Ejemplo n.º 5
0
 public void TestRemoveMonoplyThrowsWhenPlayerHasNoMonopolyCards()
 {
     var target = new Hand();
     target.removeDevCard("monopoly");
 }
Ejemplo n.º 6
0
 public void TestRemoveKnightThrowsWhenPlayerHasNoKnights()
 {
     var target = new Hand();
     target.removeDevCard("knight");
 }
Ejemplo n.º 7
0
        public void TestRemoveDevCard()
        {
            var target = new Hand();

            List<DevelopmentCard> cards = new List<DevelopmentCard>();
            cards.Add(new Knight());
            cards.Add(new MonopolyCard());
            cards.Add(new VictoryPointCard());
            cards.Add(new RoadBuilderCard());
            cards.Add(new YearOfPlentyCard());

            target.addDevCard(cards);

            Assert.AreEqual(5, target.getDevCardCount());

            target.removeDevCard("knight");
            target.removeDevCard("monopoly");
            target.removeDevCard("victoryPoint");
            target.removeDevCard("roadBuilder");
            target.removeDevCard("yearOfPlenty");

            Assert.AreEqual(0, target.getDevCardCount());
        }