public void Added_Posts_Show_Up() { ListPostPage.GoTo(PostType.Posts); ListPostPage.StoreCount(); PostCreator.CreatePost(); ListPostPage.GoTo(PostType.Posts); Assert.AreEqual(ListPostPage.PreviousPostCount + 1, ListPostPage.CurrentPostCount, "Could of posts did not increase"); Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle)); ListPostPage.TrashPost(PostCreator.PreviousTitle); Assert.AreEqual(ListPostPage.PreviousPostCount, ListPostPage.CurrentPostCount, "Could not trash post"); }
public void Added_Posts_Show_Up() { // get post count and store ListPostPage.StoreCount(); // add a new post PostCreator.CreatePost(); // get new post count Assert.AreEqual(ListPostPage.PreviousPostCount + 1, ListPostPage.CurrentPostCount, "Post count did not match"); // check for added post Assert.IsTrue(ListPostPage.DoesPostExistWithTitle(PostCreator.PreviousTitle)); // delete post ListPostPage.DeletePost(PostCreator.PreviousTitle); Assert.AreEqual(ListPostPage.PreviousPostCount, ListPostPage.CurrentPostCount, "Could not delete post"); }