public void Initialize() { best = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.DiamondKing, TestData.ClubKing }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); }
public void EqualWithDifferentHandReturnsFalse() { var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.HeartFour, TestData.SpadeFour }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); Assert.IsFalse(best == other); }
public void LessThanWithHigherHandReturnsTrue() { var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.ClubAce, TestData.HeartAce }, new List <CardValue> { CardValue.King, CardValue.Eight, CardValue.Three }); Assert.IsTrue(best < other); }
public void LessThanWithLowerHandReturnsFalse() { var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.HeartFour, TestData.SpadeFour }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); Assert.IsFalse(best < other); }
public void DifferentHandsHandHaveDifferentSameHashCode() { var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.HeartFour, TestData.SpadeFour }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); Assert.IsFalse(best.Equals((object)other)); }
public void EqualityWithSameHandAsObjectIsTrue() { var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.DiamondKing, TestData.ClubKing }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); Assert.IsTrue(best.Equals((object)other)); }
public void NotEqualWithSameHandReturnsFalse() { var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.DiamondKing, TestData.ClubKing }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); Assert.IsFalse(best != other); }
public void SameHandsHaveSameHashCode() { var expected = best.GetHashCode(); var other = new BestPossibleHand(HandName.Pair, new List <ICard> { TestData.DiamondKing, TestData.ClubKing }, new List <CardValue> { CardValue.Ace, CardValue.Eight, CardValue.Three }); var actual = other.GetHashCode(); Assert.AreEqual(expected, actual); }