public void TestAllOneSuit() { var mDeck = new Mock<IDeck<PlayingCard>>(); mDeck.Setup(m => m.CardsLeft()).Returns(4); mDeck.SetupSequence(m => m.Deal()) .Returns(new PlayingCard(PlayingCard.CardFace.Three, PlayingCard.CardSuit.Hearts)) .Returns(new PlayingCard(PlayingCard.CardFace.Eight, PlayingCard.CardSuit.Hearts)) .Returns(new PlayingCard(PlayingCard.CardFace.Five, PlayingCard.CardSuit.Hearts)) .Returns(new PlayingCard(PlayingCard.CardFace.Two, PlayingCard.CardSuit.Hearts)); var board = new GameBoard(mDeck.Object); board.DealRound(); board.Play(); Assert.AreEqual(3, board.ClearSlotCount); Assert.AreEqual(1, board.Slot2.Count); }
public void TestSlot3And4ComparisonSlot4Lower() { var mDeck = new Mock<IDeck<PlayingCard>>(); mDeck.Setup(m => m.CardsLeft()).Returns(4); mDeck.SetupSequence(m => m.Deal()) .Returns(new PlayingCard(PlayingCard.CardFace.Three, PlayingCard.CardSuit.Spades)) .Returns(new PlayingCard(PlayingCard.CardFace.Five, PlayingCard.CardSuit.Clubs)) .Returns(new PlayingCard(PlayingCard.CardFace.Five, PlayingCard.CardSuit.Hearts)) .Returns(new PlayingCard(PlayingCard.CardFace.Two, PlayingCard.CardSuit.Hearts)); var board = new GameBoard(mDeck.Object); board.DealRound(); board.Play(); Assert.AreEqual(1, board.ClearSlotCount); Assert.AreEqual(0, board.Slot4.Count); }