public void WhenIClickSend()
        {
            ScenarioContext.Current["sendTime"] = DateTime.Now;

            var page = new SendEmailPage();
            page.ClickSendButton();
        }
        public void ThenAnErrorMessageIsShown(string message)
        {
            Thread.Sleep(2000);

            var page = new SendEmailPage();
            Assert.IsTrue(
                page.EmailAddressValidation == message || page.NameValidation == message || page.Result == message);
        }
        public void ThenAnEmailIsSentToMyFriend()
        {
            Thread.Sleep(2000);

            var page = new SendEmailPage();
            Assert.IsTrue(page.Result == "Email enviado com sucesso!");

            var sendTime = (DateTime)ScenarioContext.Current["sendTime"];
            var email = new Email();
            Assert.IsTrue(email.WasSent(sendTime));
        }
 public void GivenIFilledTheFields(string name, string emailAddress)
 {
     var page = new SendEmailPage();
     page.Name = name;
     page.EmailAddress = emailAddress;
 }
 public void GivenImInTheSendFriendForm()
 {
     var page = new SendEmailPage();
     page.Open();
 }