Esempio n. 1
0
        public void Test_RoyalFlush_CreateInstance(string strCards, bool isValid)
        {
            var cards      = Utils.ParseCards(strCards);
            var royalFlush = RoyalFlush.CreateInstance(cards);

            CreateInstanceHelper(royalFlush, HandRanks.RoyalFlush, cards, isValid);
        }
Esempio n. 2
0
        public void Test_RoyalFlush_EqualityOperators(string strInputA, string strInputB, bool areEqual)
        {
            var cardsA        = Utils.ParseCards(strInputA);
            var cardsB        = Utils.ParseCards(strInputB);
            var royalFlushOne = RoyalFlush.CreateInstance(cardsA);
            var royalFlushTwo = RoyalFlush.CreateInstance(cardsB);

            EqualityOperatorsHelper(royalFlushOne, royalFlushTwo, areEqual);
        }
Esempio n. 3
0
        public void Test_RoyalFlush_ComparableTests(string royalFlushA, string royalFlushB, int comp)
        {
            var cardsA = Utils.ParseCards(royalFlushA);
            var cardsB = Utils.ParseCards(royalFlushB);

            var royalA = RoyalFlush.CreateInstance(cardsA);
            var royalB = RoyalFlush.CreateInstance(cardsB);

            ComparableTestsHelper(royalA, royalB, comp);
        }
Esempio n. 4
0
        public void Test_RoyalFlush_EqualityOperators_ForNull()
        {
            var cards      = Utils.ParseCards("TH JH KH QH AH");
            var royalflush = RoyalFlush.CreateInstance(cards);

            Assert.False(royalflush.Equals(null));

            Assert.True((RoyalFlush)null == (RoyalFlush)null);
            Assert.False((RoyalFlush)null == royalflush);
            Assert.False(royalflush == (RoyalFlush)null);

            Assert.False((RoyalFlush)null != (RoyalFlush)null);
            Assert.True((RoyalFlush)null != royalflush);
            Assert.True(royalflush != (RoyalFlush)null);
        }