//when user clicks on same card twice the score should not increment public void WhenSameCardClick() { DeploymentScreen dep = new DeploymentScreen(); dep.AddControls(); Card card1 = new Card(1); dep.CheckCards(card1); dep.CheckCards(card1); dep.ExecuteTimer2(); Assert.AreEqual(true, dep.FirstClickedVisible); Assert.AreEqual(null, dep.SecondClicked); }
//when first and second card match public void ExecuteTimer2Test() { DeploymentScreen dep = new DeploymentScreen(); dep.AddControls(); Card card1 = new Card(1); Card card2 = new Card(1); dep.CheckCards(card1); dep.CheckCards(card2); dep.ExecuteTimer2(); Assert.AreEqual(10, dep.Score); }
//when user flip second card after first card click public void CheckCardsSecondClickTest() { DeploymentScreen dep = new DeploymentScreen(); dep.AddControls(); Card card1 = new Card(1); Card card2 = new Card(2); dep.CheckCards(card1); dep.CheckCards(card2); Assert.AreEqual(card1, dep.FirstClicked); Assert.AreEqual(card2, dep.SecondClicked); }
public void CheckScoreNotSame() { DeploymentScreen dep = new DeploymentScreen(); dep.AddControls(); Card card1 = new Card(1); Card card2 = new Card(2); dep.CheckCards(card1); dep.CheckCards(card2); dep.ExecuteTimer1(); Assert.AreNotEqual(10, dep.Score); }