Пример #1
0
        public void CheckForException(string userName, string userPassword)
        {
            int postsCount;

            loginPage.LogIn(userName, userPassword);
            homePage   = navigator.GoToHomePage();
            postsCount = homePage.Posts.Count;
            Assert.Throws <NoSuchElementException>(delegate { homePage.EditPost(1); });
        }
        public void CheckIsPostDeleted(string userName, string userPassword)
        {
            int postsCount;

            loginPage.LogIn(userName, userPassword);
            homePage   = navigator.GoToHomePage();
            postsCount = homePage.Posts.Count;
            PostEditPage editPage = homePage.EditPost(1);

            editPage.TryToDeletePost();
            homePage = navigator.GoToHomePage();
            Assert.AreEqual(postsCount - 1, homePage.Posts.Count);
        }