Exemplo n.º 1
0
        public void PairBeatsHighCard()
        {
            // Arrange
            // build first hand - high card, second hand - one pair
            Game game = new Game();

            var left  = HandBuilder.BuildPair();
            var right = HandBuilder.BuildHighCard();

            // Act
            string winner = game.Play(left, right);

            // Assert
            Assert.That(winner, Is.EqualTo("left"));
        }
Exemplo n.º 2
0
        public void StraightBeatsThreeOfAKind()
        {
            // Arrange
            // build first hand - high card, second hand - one pair
            Game game = new Game();

            var left  = HandBuilder.BuildStraight();
            var right = HandBuilder.BuildThreeOfAKind();


            // Act
            string winner = game.Play(left, right);

            // Assert
            Assert.That(winner, Is.EqualTo("left"));
        }
Exemplo n.º 3
0
        public void MatchingPairIsDraw()
        {
            // Arrange
            // build first hand - high card, second hand - one pair
            Game game = new Game();

            var right = HandBuilder.BuildMatchingPairLeft();

            var left = HandBuilder.BuildMatchingPairRight();


            // Act
            string winner = game.Play(left, right);

            // Assert
            Assert.That(winner, Is.EqualTo("draw"));
        }