public void WaitForFunctionWithInputExceptionThrown() { GenericWait.Wait <bool, string>(this.ThrowError, TESTRETRY, TESTTIMEOUT, "input"); }
public void ThrowExceptionWithParamWithCustomTimesTest() { GenericWait.Wait <string>(this.ThrowError, TESTRETRY, TESTTIMEOUT, true, "Anything"); }
public void WaitForFunctionWithoutInputExceptionThrown() { GenericWait.Wait <bool>(this.ThrowError, TESTRETRY, TESTTIMEOUT); }
public void ThrowExceptionWithoutParamWithCustomTimesTest() { GenericWait.Wait(this.ThrowError, TESTRETRY, TESTTIMEOUT, true); }
public void MoveMessage() { // Test is ignored for CI test run string uniqueSubject = Guid.NewGuid().ToString(); this.SendTestEmail(uniqueSubject); GenericWait.Wait <bool, string>(this.IsEmailThere, new TimeSpan(0, 0, 1), new TimeSpan(0, 0, 30), uniqueSubject); Thread.Sleep(1000); List <MimeMessage> messageHeaders = this.EmailDriver.GetAllMessageHeaders(); foreach (MimeMessage message in messageHeaders) { Thread.Sleep(1000); if (message.Subject.Equals(uniqueSubject)) { // Move by message this.EmailDriver.MoveMailMessage(message, "Test"); break; } } if (!GenericWait.WaitUntil <string>(this.HasBeenRemoved, uniqueSubject)) { Assert.Fail("Message " + uniqueSubject + " was not removed by message"); } Thread.Sleep(1000); this.EmailDriver.SelectMailbox("Test"); messageHeaders = this.EmailDriver.GetAllMessageHeaders(); foreach (MimeMessage message in messageHeaders) { if (message.Subject.Equals(uniqueSubject)) { // Move by unique identifier this.EmailDriver.MoveMailMessage(message, "AA"); break; } } if (!GenericWait.WaitUntil <string>(this.HasBeenRemoved, uniqueSubject)) { Assert.Fail("Message " + uniqueSubject + " was not removed by uid"); } Thread.Sleep(100); this.EmailDriver.SelectMailbox("AA"); messageHeaders = this.EmailDriver.GetAllMessageHeaders(); foreach (MimeMessage message in messageHeaders) { if (message.Subject.Equals(uniqueSubject)) { this.EmailDriver.DeleteMessage(message); return; } } Assert.Fail("Message " + uniqueSubject + " was moved to new folder"); }