Ejemplo n.º 1
0
        public void VerifyChangingMachine()
        {
            ConstantsLib.Driver.Navigate().GoToUrl(ConstantsLib.SlotMachineURL);
            F_General.WaitForPageLoaded(TimeSpan.FromSeconds(20));
            Game game = new Game();

            game.ChangeMachine("5");
            Verification.VerifyMachine("5", ref Result, ref Msg);
            Assert.IsTrue(Result, Msg);
        }
Ejemplo n.º 2
0
        public void VerifyCreditsReducedAfterSpin()
        {
            ConstantsLib.Driver.Navigate().GoToUrl(ConstantsLib.SlotMachineURL);
            F_General.WaitForPageLoaded(TimeSpan.FromSeconds(20));
            Game game = new Game();

            game.BetNumber(1);
            S_Mouse.Click(BetContainer.btnSpin);
            Verification.VerifyElementText(BetContainer.txtCredits, (game.Credits - game.Bet).ToString(), ref Result, ref Msg);
            Assert.IsTrue(Result, Msg);
        }
Ejemplo n.º 3
0
        public void VerifySpinWithoutWin()
        {
            ConstantsLib.Driver.Navigate().GoToUrl(ConstantsLib.SlotMachineURL);
            F_General.WaitForPageLoaded(TimeSpan.FromSeconds(20));
            Game game = new Game();

            game.BetNumber(3);
            game.SpinWithoutWin();
            Verification.VerifyWinBannerDisplayed(Images.WinBanner, ref Result, ref Msg);
            Assert.IsFalse(Result, Msg);
        }
Ejemplo n.º 4
0
        public void VerifySpinWithWin()
        {
            ConstantsLib.Driver.Navigate().GoToUrl(ConstantsLib.SlotMachineURL);
            F_General.WaitForPageLoaded(TimeSpan.FromSeconds(20));
            Game game = new Game();

            game.BetNumber(1);
            game.SpinWithWin();
            Verification.VerifyElementText(BetContainer.txtCredits, game.Credits.ToString(), ref Result, ref Msg);
            Verification.VerifyElementText(BetContainer.txtLastWin, game.LastWin.ToString(), ref Result, ref Msg);
            Verification.VerifyWinningReels(ref Result, ref Msg);
            Verification.VerifyWinBannerDisplayed(Images.WinBanner, ref Result, ref Msg);
            Assert.IsTrue(Result, Msg);
        }
Ejemplo n.º 5
0
        public void VerifyBetUp()
        {
            ConstantsLib.Driver.Navigate().GoToUrl(ConstantsLib.SlotMachineURL);
            F_General.WaitForPageLoaded(TimeSpan.FromSeconds(20));
            Game game = new Game();
            Dictionary <String, WinChartAttributes> InitPrizeList = game.InitPrizeList;

            for (int i = 1; i < 10; i++)
            {
                game.BetNumber(i + 1);
                Verification.VerifyElementText(BetContainer.txtBet, Convert.ToString(i + 1), ref Result, ref Msg);
                Verification.VerifyWinChartUpdatedAfterBet(ref game, ref Result, ref Msg);
                Thread.Sleep(1000);
            }

            Assert.IsTrue(Result, Msg);
        }
Ejemplo n.º 6
0
        public void VerifyBetDown()
        {
            ConstantsLib.Driver.Navigate().GoToUrl(ConstantsLib.SlotMachineURL);
            F_General.WaitForPageLoaded(TimeSpan.FromSeconds(20));
            Game game = new Game();

            game.BetNumber(10);

            for (int i = 10; i == 2; i--)
            {
                game.BetNumber(i - 1);
                Verification.VerifyElementText(BetContainer.txtBet, Convert.ToString(i - 1), ref Result, ref Msg);
                Verification.VerifyWinChartUpdatedAfterBet(ref game, ref Result, ref Msg);
                Thread.Sleep(1000);
            }

            Assert.IsTrue(Result, Msg);
        }