Esempio n. 1
0
        private void SetupBlockedAttachment()
        {
            BlockedAttachment ba = _application.Settings.AntiVirus.BlockedAttachments.Add();

            ba.Description = "My description";
            ba.Wildcard    = "*.my";
            ba.Save();
        }
Esempio n. 2
0
        public void TestBlockedAttachment()
        {
            Settings oSettings = SingletonProvider <TestSetup> .Instance.GetApp().Settings;

            BlockedAttachment attachment = oSettings.AntiVirus.BlockedAttachments.Add();

            attachment.Description = "Some description";
            attachment.Wildcard    = "*.some";
            attachment.Save();

            if (attachment.ID == 0)
            {
                throw new Exception("Blocked attachment not properly saved");
            }

            oSettings.AntiVirus.BlockedAttachments.DeleteByDBID(attachment.ID);
        }
Esempio n. 3
0
        private void ConfirmBlockedAttachments()
        {
            BlockedAttachments attachments = _application.Settings.AntiVirus.BlockedAttachments;

            Assert.Greater(attachments.Count, 0);

            for (int i = 0; i < attachments.Count; i++)
            {
                BlockedAttachment ba = attachments[i];

                if (ba.Description == "My description" && ba.Wildcard == "*.my")
                {
                    return;
                }
            }

            Assert.Fail("Blocked attachment not found");
        }