Ejemplo n.º 1
0
        public void TC01_CheckTitleOfMainNews()
        {
            /*  Go to News page
             *  take title of the first article in Main news
             *  compare text with the hardcoded string value*/

            HomePage homePage = new HomePage();

            homePage.GoToNews();
            NewsPage newsPage = new NewsPage();

            Assert.AreEqual("Trump to visit mass shooting sites amid criticism", newsPage.GetMainNews());
        }
Ejemplo n.º 2
0
        public void TC02_CheckTitleOfSecondNews()
        {
            /*  Go to News page
             *  take titles of the rest of the articles in Main news
             *  compare it with the hardcoded string values*/

            HomePage homePage = new HomePage();

            homePage.GoToNews();
            NewsPage      newsPage     = new NewsPage();
            List <string> ActualResult = newsPage.GetSecondNews();

            List <string> ExpectedResult = new List <string>();

            ExpectedResult.Add("Dozens dead in Tanzania fuel tanker blast");
            ExpectedResult.Add("Walmart panic caused by gun rights 'test'");
            ExpectedResult.Add("North Korea tests 'short-range ballistic missiles'");
            ExpectedResult.Add("'Even I will pick up a gun': Inside Kashmir's lockdown");
            ExpectedResult.Add("'We moved to the forest to fight climate change'");

            CollectionAssert.AreEqual(ExpectedResult, ActualResult);
        }