Ejemplo n.º 1
0
        [Category("Inedible")]    // at 16-05-06 because you might get a profile "login" dialog
        public void TestEmailWithNoAttachmentsAndNoRiskContent()
        {
            // This is a slow test because it is waiting for something to not happen for 15s. Might do better later ;-)
            Guid searchKey = Guid.NewGuid();
            _MailItem mailItem = CreateExternalEmailItem(searchKey);

            OutlookSecurity OutlookBarGroup = new OutlookSecurity();
            OutlookBarGroup.DismissSecurityDialog();
            Assert.IsTrue(m_windowEnumerator.BackgroundWaitForProtectDialog_DefaultButton(15000), "Could not schedule dialog handling for the test");
            mailItem.Send();
            Assert.IsTrue(WaitAMinuteWindowEnumeratorToFinish(), "Seem to have locked up somewhere");

            Assert.IsFalse(m_windowEnumerator.LastBackgroundActionCompletedOK(), "We appear to be blocking a B9 e-mail");
            m_windowEnumerator.CollectWindowDetails();
            Assert.IsFalse(m_windowEnumerator.ProtectDialogIsShowing(), "The dialog should not be shown at all");
        }
Ejemplo n.º 2
0
        [Category("Inedible")]    // at 16-05-06 because you might get a profile "login" dialog
        public void TestEmailWithProfanityInTheSubject()
        {
            Guid searchKey = Guid.NewGuid();
            _MailItem mailItem = CreateExternalEmailItem(searchKey, "No shit Sherlock");

            OutlookSecurity OutlookBarGroup = new OutlookSecurity();
            OutlookBarGroup.DismissSecurityDialog();
            Assert.IsTrue(m_windowEnumerator.BackgroundWaitForProtectDialog_DefaultButton(30000), "Could not schedule dialog handling for the test");
            mailItem.Send();
            Assert.IsTrue(WaitAMinuteWindowEnumeratorToFinish(), "Seem to have locked up somewhere");
 
            Assert.IsTrue(m_windowEnumerator.LastBackgroundActionCompletedOK(), "Did not use the dialog properly during the send");
            m_windowEnumerator.CollectWindowDetails();
            Assert.IsFalse(m_windowEnumerator.ProtectDialogIsShowing(), "The dialog should have gone now");
        }