Esempio n. 1
0
        public void ReturnTheHighestCardWhenOneOfThemIsTrumpSuit()
        {
            IList<ICard> cards = new List<ICard>
            {
                King.Of(Suit.Hearts),
                King.Of(Suit.Diamonds),
                Two.Of(Suit.Spades),
                Six.Of(Suit.Spades)
            };
            var calculator = new HighestCardCalculator(Suit.Spades);

            ICard highestCard = calculator.HighestCard(cards);

            Assert.That(highestCard, Is.EqualTo(Six.Of(Suit.Spades)));
        }
Esempio n. 2
0
        public void ReturnTheHighestCardOfTheFirstSuitWhenNoneOfThemIsNotTrumpSuit()
        {
            IList<ICard> cards = new List<ICard>
            {
                Queen.Of(Suit.Hearts),
                King.Of(Suit.Diamonds),
                Two.Of(Suit.Hearts),
                Six.Of(Suit.Spades)
            };
            var calculator = new HighestCardCalculator(Suit.Clubs);

            ICard highestCard = calculator.HighestCard(cards);

            Assert.That(highestCard, Is.EqualTo(Queen.Of(Suit.Hearts)));
        }