public void CheckTheSpam() { IpHandler hand = new IpHandler(); MailBoxPageSteps mailPage = new MailBoxPageSteps(); SpamPageSteps spamPage = new SpamPageSteps(); loginPage.Authorize(Data.user1, Data.password); mailPage.WriteMessage(Data.user2, "for spam1", "Spam.123" + hand.GetIp(Data.ip)); logoutPage.CommonExit(); loginPage.Authorize(Data.user2, Data.password); mainPage.AddToSpam(); logoutPage.CommonExit(); loginPage.Authorize(Data.user1, Data.password); mailPage.WriteMessage(Data.user2, "for spam2", "Spam.456"); logoutPage.CommonExit(); loginPage.Authorize(Data.user2, Data.password); mainPage.GoToSpam(); spamPage.CheckSpam(); Assert.AreEqual("for spam2", spamPage.topic); }