public void ThePackOfCardsShouldContain52CardsWhenCreated() { IPackOfCardsCreator packOfCardsCreator = new PackOfCardsCreator(); IPackOfCards packOfCards = packOfCardsCreator.Create(); const int expectedNumberOfCards = 52; int numberOfCards = packOfCards.Count; Assert.AreEqual(expectedNumberOfCards, numberOfCards); }
public void TheCardsShouldAllBeUniqueAfterTheShuffle() { IPackOfCardsCreator packOfCardsCreator = new PackOfCardsCreator(); IPackOfCards packOfCards = packOfCardsCreator.Create(); packOfCards.Shuffle(); CollectionAssert.AllItemsAreUnique(packOfCards); }
public void TheCardShouldNoLongerBeInThePackAfterACardIsRemoved() { IPackOfCardsCreator packOfCardsCreator = new PackOfCardsCreator(); IPackOfCards packOfCards = packOfCardsCreator.Create(); ICard cardRemoved = packOfCards.TakeCardFromTopOfPack(); CollectionAssert.DoesNotContain(packOfCards, cardRemoved); }
public void ThePackOfCardsShouldContainTheSameNumberOfCardsWhenShuffled() { IPackOfCardsCreator packOfCardsCreator = new PackOfCardsCreator(); IPackOfCards packOfCards = packOfCardsCreator.Create(); int expectedCount = packOfCards.Count; packOfCards.Shuffle(); int resultCount = packOfCards.Count; Assert.AreEqual(expectedCount, resultCount); }
public void TheCountOfThePackShouldDecreaseByOneAfterACardIsTakenFromTheTop() { IPackOfCardsCreator packOfCardsCreator = new PackOfCardsCreator(); IPackOfCards packOfCards = packOfCardsCreator.Create(); int countBeforeTheCardIsRemoved = packOfCards.Count; int expectedCountAfterCut = countBeforeTheCardIsRemoved - 1; ICard card = packOfCards.TakeCardFromTopOfPack(); int countResult = packOfCards.Count; Assert.AreEqual(expectedCountAfterCut, countResult); }