public void NewDeckContainsOneOfEachPermutation() { var deck = new Deck(); deck.FillDeckWithAllCards(); var shapes = Enum.GetValues(typeof(Enums.Shape)).Cast<Enums.Shape>(); var colors = Enum.GetValues(typeof(Enums.Color)).Cast<Enums.Color>(); var numbers = Enum.GetValues(typeof(Enums.Number)).Cast<Enums.Number>(); var shadings = Enum.GetValues(typeof(Enums.Shading)).Cast<Enums.Shading>(); foreach (var shape in shapes) { foreach (var color in colors) { foreach (var number in numbers) { foreach (var shading in shadings) { Assert.IsTrue( deck.Cards.Count( x => x.Shape == shape && x.Color == color && x.Number == number && x.Shading == shading) == 1); } } } } }
public void GetAllMatchesFullDeck() { var deck = new Deck(); deck.FillDeckWithAllCards(); var matches = deck.GetAllMatches(); Assert.AreEqual(1080, matches.Count); }
public void FilledDeckContains81Cards() { var deck = new Deck(); deck.FillDeckWithAllCards(); Assert.AreEqual(81, deck.Cards.Count); }