示例#1
0
        public async Task PlayerCheckForMatchAsyncFailsWhenCentralPileIsEmpty()
        {
            // Arrange
            var hand        = new SnapHand();
            var player      = new SnapPlayer("Player 1", hand);
            var centralPile = new SnapCentralPile();

            // Act
            var test = await player.CheckForMatchAsync(centralPile);

            // Assert
            Assert.IsFalse(test);
        }
示例#2
0
        public async Task PlayerCheckForMatchAsyncFailsWhenNotPresent()
        {
            // Arrange
            var hand        = new SnapHand();
            var player      = new SnapPlayer("Player 1", hand);
            var centralPile = new SnapCentralPile();

            centralPile.Add(new SnapCard(Suit.Hearts, Rank.Queen));
            centralPile.Add(new SnapCard(Suit.Clubs, Rank.King));

            // Act
            var test = await player.CheckForMatchAsync(centralPile);

            // Assert
            Assert.IsFalse(test);
        }