public void ReturnTrueWithTwoWilds() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Wild, CardColor.Green), new Card(CardType.Wild, CardColor.Blue), new Card(CardType.Eight, CardColor.Red) }); Assert.True(combo.IsValid()); }
public void ReturnTrueWhenLastCardIsWild() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Five, CardColor.Any), new Card(CardType.Six, CardColor.Any), new Card(CardType.Wild, CardColor.Any) }); Assert.True(combo.IsValid()); }
public void ReturnTrueWhenFirstTwoCardsAreWild() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Three, CardColor.Any) }); Assert.True(combo.IsValid()); }
public void ReturnsFalseWhenContainsSkipCard() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.One, CardColor.Any), new Card(CardType.Two, CardColor.Any), new Card(CardType.Skip, CardColor.Any) }); Assert.False(combo.IsValid()); }
public void ReturnTrueForAllWilds() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any) }); Assert.True(combo.IsValid()); }
public void ReturnTrueForSimpleCase() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.One, CardColor.Green), new Card(CardType.Two, CardColor.Blue), new Card(CardType.Three, CardColor.Red) }); Assert.True(combo.IsValid()); }
public void ReturnsFalseWhenRunTooHigh() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Twelve, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any) }); Assert.False(combo.IsValid()); }
public void ReturnFalseWhenLastNumberIsNotValid() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.One, CardColor.Any) }); Assert.False(combo.IsValid()); }
public void ReturnFalseWhenNotValidRun() { RunCardCombination combo = new RunCardCombination(3); combo.Cards.AddRange(new List <Card>() { new Card(CardType.One, CardColor.Any), new Card(CardType.Two, CardColor.Any), new Card(CardType.Four, CardColor.Any) }); Assert.False(combo.IsValid()); }
public void ReturnsFalseWhenNotValidWithWildsInMiddleHighNumber() { RunCardCombination combo = new RunCardCombination(5); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Four, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Nine, CardColor.Any) }); Assert.False(combo.IsValid()); }
public void ReturnsTrueWhenValidWithWildsInMiddle() { RunCardCombination combo = new RunCardCombination(5); combo.Cards.AddRange(new List <Card>() { new Card(CardType.Four, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Wild, CardColor.Any), new Card(CardType.Eight, CardColor.Any) }); Assert.True(combo.IsValid()); }
public void ReturnFalseWhenNotLongEnough() { RunCardCombination combo = new RunCardCombination(3); Assert.False(combo.IsValid()); }