public void DoAction_ProcessPDF_Triggers()
        {
            //Arrange
            RuleCriteria ruleCriteria = GetDefaultCriteria();
            {
                ruleCriteria.ResultingAction = new OlDocPublish.RulesMock.RuleAction[] { OlDocPublish.RulesMock.RuleAction.ProcessPDF };
            }
            MailItem    mail          = Factory.GetTestMail(_app);
            MailItem_ID mailID        = new MailItem_ID(mail);
            string      beforeProcess = _processor.SO;

            //Act
            ruleCriteria.DoAction(mailID);
            string afterProcess = _processor.SO;

            //Assert
            Assert.AreNotEqual(beforeProcess, afterProcess);
        }
        public void DoAction_MoveToFolder_MovesMail()
        {
            //Arrange
            string   uuid     = System.Guid.NewGuid().ToString();
            MailItem testMail = Factory.GetTestMail(_app);;

            testMail.Body = uuid;
            testMail.Save();
            MailItem_ID  mailID   = new MailItem_ID(testMail);
            RuleCriteria criteria = GetDefaultCriteria();
            {
                criteria.ResultingAction = new OlDocPublish.RulesMock.RuleAction[] { OlDocPublish.RulesMock.RuleAction.MoveToFolder };
                criteria.ActionArg       = "Test Folder";
            }

            Folder targetFolder = _app.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox).Parent.Folders["Test Folder"];
            bool   expected     = true;
            bool   actual       = false;

            //Act
            criteria.DoAction(mailID);

            //Assert
            foreach (MailItem mail in targetFolder.Items)
            {
                if (mail.Body.Contains(uuid))
                {
                    actual = true;
                }
            }

            if (targetFolder == null ||
                targetFolder.Items.Count == 0)
            {
                Assert.Fail();
            }

            Assert.AreEqual(expected, actual);
        }