public void Test_OnePair_CreateInstance(string strCards, bool isValid) { var cards = Utils.ParseCards(strCards); var onePair = OnePair.CreateInstance(cards); CreateInstanceHelper(onePair, HandRanks.OnePair, cards, isValid); }
public void Test_OnePair_EqualityOperators(string strInputA, string strInputB, bool areEqual) { var cardsA = Utils.ParseCards(strInputA); var cardsB = Utils.ParseCards(strInputB); var OnePairOne = OnePair.CreateInstance(cardsA); var OnePairTwo = OnePair.CreateInstance(cardsB); EqualityOperatorsHelper(OnePairOne, OnePairTwo, areEqual); }
public void Test_OnePair_ComparableTests(string strInputA, string strInputB, int comp) { var cardsA = Utils.ParseCards(strInputA); var cardsB = Utils.ParseCards(strInputB); var onePairOne = OnePair.CreateInstance(cardsA); var onePairTwo = OnePair.CreateInstance(cardsB); ComparableTestsHelper(onePairOne, onePairTwo, comp); }
public void Test_OnePair_EqualityOperators_ForNull() { var cards = Utils.ParseCards("4H AH AC 7D 8S"); var onePair = OnePair.CreateInstance(cards); Assert.False(onePair.Equals(null)); Assert.True((OnePair)null == (OnePair)null); Assert.False((OnePair)null == onePair); Assert.False(onePair == (OnePair)null); Assert.False((OnePair)null != (OnePair)null); Assert.True((OnePair)null != onePair); Assert.True(onePair != (OnePair)null); }