Esempio n. 1
0
        public void T06CheckForMatchFalse()
        {
            Slots slots = new Slots();

            slots.left   = 1;
            slots.middle = 1;
            slots.right  = 2;
            Assert.True(slots.CheckForMatch() == "lose");
            slots.left   = 2;
            slots.middle = 1;
            slots.right  = 1;
            Assert.True(slots.CheckForMatch() == "lose");
        }
Esempio n. 2
0
        public void T05CheckForMatchTrue()
        {
            Slots slots = new Slots();

            slots.left   = 7;
            slots.middle = 7;
            slots.right  = 7;
            Assert.True(slots.CheckForMatch() == "win");
        }
Esempio n. 3
0
        public void T07GoldenTest()
        {
            Slots slots = new Slots();

            for (int i = 0; i < 500; i++)
            {
                slots.SetLeft();
                Assert.True(slots.left == 7 || (slots.left >= 1 && slots.left <= 3));
                slots.SetMiddle();
                Assert.True(slots.middle == 7 || (slots.middle >= 1 && slots.middle <= 3));
                slots.SetRight();
                Assert.True(slots.right == 7 || (slots.right >= 1 && slots.right <= 3));
                slots.status = slots.CheckForMatch();
                Assert.True(slots.status == "win" || slots.status == "lose");
            }
        }