public void ContactFormShouldSendMessageToCustomerServiceSuccessfully(ContactSubject subject) { this.contactPage.Open(); var contactUser = new ContactUser(subject, "*****@*****.**", "Test message"); contactUser.FileAttach = Directory.GetCurrentDirectory() + @"\Data\example.txt"; this.contactPage.SubmitForm(contactUser); Assert.That(this.contactPage.SuccessMessage.Text == "Your message has been successfully sent to our team."); }
public ContactUser(ContactSubject subject, string email, string message) { this.Subject = subject; this.Email = email; this.Message = message; }