コード例 #1
0
        public void CheckHand_WithJokerFifth()
        {
            // Arrange
            var c1      = new Card(10, new Suite(1));
            var c2      = new Card(11, new Suite(1));
            var c3      = new Card(12, new Suite(1));
            var c4      = new Card(13, new Suite(1));
            var c5      = new Card(15, new Suite(1));
            var service = new RoyalFlushJokerHandCheck();

            // Act
            var handResult = service.CheckHand(c1, c2, c3, c4, c5);

            // Assert
            Assert.IsInstanceOfType(handResult.Result, typeof(RoyalFlush), "Result should be RoyalFlush");
        }
コード例 #2
0
        public void CheckHand_WithJokerFifth_NotAllSuites_ReturnsNull()
        {
            // Arrange
            var c1      = new Card(10, new Suite(1));
            var c2      = new Card(11, new Suite(2));
            var c3      = new Card(12, new Suite(1));
            var c4      = new Card(13, new Suite(1));
            var c5      = new Card(15, new Suite(1));
            var service = new RoyalFlushJokerHandCheck();

            // Act
            var handResult = service.CheckHand(c1, c2, c3, c4, c5);

            // Assert
            Assert.IsNull(handResult, "Result should not be RoyalFlush");
        }