コード例 #1
0
        public void GetRanking_OnePairHand_ReturnsOnePairType()
        {
            var hand = new Mock <IHand>().OnePairHandRank();

            var ranker = new PokerHandRanker();

            var ranking = ranker.GetRanking(hand.Object);

            Assert.IsType <OnePairHand>(ranking);
        }
コード例 #2
0
        public void GetRanking_FullHouseHand_ReturnsFullHouseType()
        {
            var hand = new Mock <IHand>().FullHouseHandRank();

            var ranker = new PokerHandRanker();

            var ranking = ranker.GetRanking(hand.Object);

            Assert.IsType <FullHouseHand>(ranking);
        }
コード例 #3
0
        public void GetRanking_ThreeOfAKindHand_ReturnsThreeOfAKindType()
        {
            var hand = new Mock <IHand>().ThreeOfAKindHandRank();

            var ranker = new PokerHandRanker();

            var ranking = ranker.GetRanking(hand.Object);

            Assert.IsType <ThreeOfAKindHand>(ranking);
        }
コード例 #4
0
        public void GetRanking_RoyalFlushHand_ReturnsRoyalFlushType()
        {
            var hand = new Mock <IHand>().RoyalFlushHandRank();

            var ranker = new PokerHandRanker();

            var ranking = ranker.GetRanking(hand.Object);

            Assert.IsType <RoyalFlushHand>(ranking);
        }
コード例 #5
0
        public void GetRanking_HighCardHand_ReturnsHighCard()
        {
            var hand = new Mock <IHand>().HighCardHandRank();

            var ranker = new PokerHandRanker();

            var ranking = ranker.GetRanking(hand.Object);

            Assert.IsType <HighCardHand>(ranking);
        }
コード例 #6
0
        public void GetRanking_StraightHand_ReturnsStraightType()
        {
            var hand = new Mock <IHand>().StraightHandRank();

            var ranker = new PokerHandRanker();

            var ranking = ranker.GetRanking(hand.Object);

            Assert.IsType <StraightHand>(ranking);
        }