예제 #1
0
        //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);
        }
예제 #2
0
        //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);
        }
예제 #3
0
        //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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        //when user flip first card
        public void CheckCardsFirstClickTest()
        {
            DeploymentScreen dep   = new DeploymentScreen();
            Card             card1 = new Card(1);

            dep.CheckCards(card1);
            Assert.AreEqual(card1, dep.FirstClicked);
        }