Beispiel #1
0
        public void Get_Refresh_Deck_Success()
        {
            //Arrage
            var service = new PokerService();

            //Act
            var deck  = service.GetRefreshDeck(1);
            var deck2 = service.GetRefreshDeck(1);

            //Assert : have a small chance of failing
            Assert.IsTrue(deck.Cards[0].Suit != deck2.Cards[0].Suit || deck.Cards[0].Number != deck2.Cards[0].Number);
        }
Beispiel #2
0
        public void Dispatch_Card_Success()
        {
            //Arrange
            var service   = new PokerService();
            var deck      = service.GetRefreshDeck(1);
            var playerNum = 4;

            //Act
            var cards = service.DispatchCards(deck, playerNum);

            //Assert
            Assert.IsTrue(cards.Length == playerNum);
            Assert.IsTrue(cards[0].Length == 2);
            Assert.IsTrue(cards[0][0].Number != cards[0][1].Number || cards[0][0].Suit != cards[0][1].Suit);
        }