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); }
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); }
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); }
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); }