コード例 #1
0
 public void WaitForFunctionWithInputExceptionThrown()
 {
     GenericWait.Wait <bool, string>(this.ThrowError, TESTRETRY, TESTTIMEOUT, "input");
 }
コード例 #2
0
 public void ThrowExceptionWithParamWithCustomTimesTest()
 {
     GenericWait.Wait <string>(this.ThrowError, TESTRETRY, TESTTIMEOUT, true, "Anything");
 }
コード例 #3
0
 public void WaitForFunctionWithoutInputExceptionThrown()
 {
     GenericWait.Wait <bool>(this.ThrowError, TESTRETRY, TESTTIMEOUT);
 }
コード例 #4
0
 public void ThrowExceptionWithoutParamWithCustomTimesTest()
 {
     GenericWait.Wait(this.ThrowError, TESTRETRY, TESTTIMEOUT, true);
 }
コード例 #5
0
        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");
        }