Beispiel #1
0
        public void Test_HighCard_CreateInstance(string strCards, bool isValid)
        {
            var cards    = Utils.ParseCards(strCards);
            var highCard = HighCard.CreateInstance(cards);

            CreateInstanceHelper(highCard, HandRanks.HighCard, cards, isValid);
        }
Beispiel #2
0
        public void Test_HighCard_EqualityOperators(string strInputA, string strInputB, bool areEqual)
        {
            var cardsA = Utils.ParseCards(strInputA);
            var cardsB = Utils.ParseCards(strInputB);

            var highCardOne = HighCard.CreateInstance(cardsA);
            var highCardTwo = HighCard.CreateInstance(cardsB);

            EqualityOperatorsHelper(highCardOne, highCardTwo, areEqual);
        }
Beispiel #3
0
        public void Test_HighCard_ComparableTests(string strInputA, string strInputB, int comp)
        {
            var cardsA = Utils.ParseCards(strInputA);
            var cardsB = Utils.ParseCards(strInputB);

            var highCardOne = HighCard.CreateInstance(cardsA);
            var highCardTwo = HighCard.CreateInstance(cardsB);

            ComparableTestsHelper(highCardOne, highCardTwo, comp);
        }
Beispiel #4
0
        public void Test_HighCard_EqualityOperators_ForNull()
        {
            var cards    = Utils.ParseCards("7S 3H 5D KC 2C");
            var highCard = HighCard.CreateInstance(cards);

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

            Assert.True((HighCard)null == (HighCard)null);
            Assert.False((HighCard)null == highCard);
            Assert.False(highCard == (HighCard)null);

            Assert.False((HighCard)null != (HighCard)null);
            Assert.True((HighCard)null != highCard);
            Assert.True(highCard != (HighCard)null);
        }