public void ThenICanGetEmailItemsSortedByRecievedDate() { Items items = outlookHelper.SortOutlookEmails("ReceivedTime", "[Subject] = 'Test Automation'", "Inbox"); for (int i = 1; i <= items.Count; i++) { var item = items[i]; AssertHelpers.AssertContains(item.Subject.Replace(System.Environment.NewLine, string.Empty), "Test Automation"); AssertHelpers.AssertContains(item.Body.Replace(System.Environment.NewLine, string.Empty), "This is an test email."); } }
public void ThenICanReadTheRecivedEmail() { outlookHelper.ReadOutlookEmail(inbox, "[Subject] = 'Test Automation'"); var from = outlookHelper.From; var to = outlookHelper.To; var subject = outlookHelper.Subject; var body = outlookHelper.Body; AssertHelpers.AssertEquals(from, "*****@*****.**"); AssertHelpers.AssertEquals(to, "*****@*****.**"); AssertHelpers.AssertEquals(subject, "Test Automation"); AssertHelpers.AssertContains(body, "This is an test email."); }