Example #1
0
        public void CheckNumberOfGeneratedLists()
        {
            MainPage main = new MainPage();

            Assert.Multiple(() =>
            {
                foreach (int number in numberOfListsToGenerate)
                {
                    main.GoToPage();
                    main.SetUnitToGenerate(MainPage.UnitToGenerate.Lists);
                    main.SetAmountToGenerate(number);

                    GeneratedPage generated = main.Generate();

                    int actual = generated.CountGeneratedLists();

                    int expected;
                    if (number <= 0)
                    {
                        expected = 5;
                    }
                    else
                    {
                        expected = number;
                    }

                    Assert.AreEqual(expected, actual);
                }
            });
        }
Example #2
0
        public GeneratedPage Generate()
        {
            ScrollToElement(generateButton);
            generateButton.Click();
            GeneratedPage generated = new GeneratedPage(driver);

            return(generated);
        }