public void Test_ThreeOfAkind_CreateInstance(string strCards, bool isValid) { var cards = Utils.ParseCards(strCards); var threeOfAKind = ThreeOfAkind.CreateInstance(cards); CreateInstanceHelper(threeOfAKind, HandRanks.ThreeOfAkind, cards, isValid); }
public void Test_ThreeOfAkind_EqualityOperators(string strInputA, string strInputB, bool areEqual) { var cardsA = Utils.ParseCards(strInputA); var cardsB = Utils.ParseCards(strInputB); var threeOfAKindOne = ThreeOfAkind.CreateInstance(cardsA); var threeOfAKindTwo = ThreeOfAkind.CreateInstance(cardsB); EqualityOperatorsHelper(threeOfAKindOne, threeOfAKindTwo, areEqual); }
public void Test_ThreeOfAkind_ComparableTests(string strInputA, string strInputB, int comp) { var cardsA = Utils.ParseCards(strInputA); var cardsB = Utils.ParseCards(strInputB); var threeOfAkindOne = ThreeOfAkind.CreateInstance(cardsA); var threeOfAkindTwo = ThreeOfAkind.CreateInstance(cardsB); ComparableTestsHelper(threeOfAkindOne, threeOfAkindTwo, comp); }
public void Test_ThreeOfAkind_EqualityOperators_ForNull() { var cards = Utils.ParseCards("2D 2C 2S 5D 6D"); var threeOfAKind = ThreeOfAkind.CreateInstance(cards); Assert.False(threeOfAKind.Equals(null)); Assert.True((ThreeOfAkind)null == (ThreeOfAkind)null); Assert.False((ThreeOfAkind)null == threeOfAKind); Assert.False(threeOfAKind == (ThreeOfAkind)null); Assert.False((ThreeOfAkind)null != (ThreeOfAkind)null); Assert.True((ThreeOfAkind)null != threeOfAKind); Assert.True(threeOfAKind != (ThreeOfAkind)null); }