public void MaxNumberRemovableTest() { Assert.AreEqual(0, space.MaxNumberRemovable()); Card c = RandomCard.GetRandomCard(); List <Card> temp = new List <Card>(); temp.Add(c); space.Place(temp); Assert.AreEqual(1, space.MaxNumberRemovable()); }
public void FreeSpaceIsFreeTest() { Assert.IsTrue(space.IsFree()); Card c = RandomCard.GetRandomCard(); List <Card> temp = new List <Card>(); temp.Add(c); space.Place(temp); Assert.IsFalse(space.IsFree()); }
public void GetCardTest() { TestCardStack cards = new TestCardStack(); Card c = RandomCard.GetRandomCard(); cards.CardList.Add(c); Card d = cards.GetCard(0); Assert.AreEqual(c, d); }
public void IsPlaceableTest() { Card c = RandomCard.GetRandomCard(); List <Card> temp = new List <Card>(); temp.Add(c); temp.Add(c); Assert.IsFalse(space.IsPlaceable(temp)); temp.Remove(c); Assert.IsTrue(space.IsPlaceable(temp)); space.Place(temp); Assert.IsFalse(space.IsPlaceable(temp)); }
public void Initialize() { sourceToModify = new TestCardStack(); sourceToCompare = new TestCardStack(); destinationToModify = new TestCardStack(); destinationToCompare = new TestCardStack(); for (int i = 0; i < stackSize; i++) { Card rand1 = RandomCard.GetRandomCard(); Card rand2 = RandomCard.GetRandomCard(); sourceToCompare.CardList.Add(rand1); sourceToModify.CardList.Add(rand1); destinationToCompare.CardList.Add(rand2); destinationToModify.CardList.Add(rand2); } }