public void Test_Flush_CreateInstance(string strCards, bool isValid) { var cards = Utils.ParseCards(strCards); var flush = Flush.CreateInstance(cards); CreateInstanceHelper(flush, HandRanks.Flush, cards, isValid); }
public void Test_Flush_EqualityOperators(string strInputA, string strInputB, bool areEqual) { var cardsA = Utils.ParseCards(strInputA); var cardsB = Utils.ParseCards(strInputB); var flushOne = Flush.CreateInstance(cardsA); var flushTwo = Flush.CreateInstance(cardsB); EqualityOperatorsHelper(flushOne, flushTwo, areEqual); }
public void Test_Flush_ComparableTests(string strInputA, string strInputB, int comp) { var cardsA = Utils.ParseCards(strInputA); var cardsB = Utils.ParseCards(strInputB); var flushOne = Flush.CreateInstance(cardsA); var flushTwo = Flush.CreateInstance(cardsB); ComparableTestsHelper(flushOne, flushTwo, comp); }
public void Test_Flush_EqualityOperators_ForNull() { var cards = Utils.ParseCards("3D 5D 7D 9D JD"); var flush = Flush.CreateInstance(cards); Assert.False(flush.Equals(null)); Assert.True((Flush)null == (Flush)null); Assert.False((Flush)null == flush); Assert.False(flush == (Flush)null); Assert.False((Flush)null != (Flush)null); Assert.True((Flush)null != flush); Assert.True(flush != (Flush)null); }