private void SetUp(IList <TestUser> users, TestRegion region, string subject, string body, IList <string> fileNames)
        {
            var info     = new DocSourceHandlerTestInfo();
            var supplier = TestSupplier.CreateNaked(session);

            var from = String.Format("{0}@supplier.test", supplier.Id);

            PrepareSupplier(supplier, from);
            info.Supplier = supplier;

            var toList = users.Select(u => "{0}@docs.analit.net".Format(u.AvaliableAddresses[0].Id)).ToList();

            if (region != null)
            {
                toList.Add(region.ShortAliase + "@docs.analit.net");
            }

            var message = ImapHelper.BuildMessageWithAttachments(
                subject,
                body,
                toList.ToArray(),
                new[] { from },
                fileNames != null ? fileNames.ToArray() : null);

            info.Mime = message;

            info.Region = region;
            info.Users  = users;

            _info = info;
        }
 public void DeleteDirectories()
 {
     SetDefaultValues();
     _info = null;
     TestHelper.RecreateDirectories();
     ImapHelper.ClearImapFolder(Settings.Default.TestIMAPUser, Settings.Default.TestIMAPPass, Settings.Default.IMAPSourceFolder);
     ImapHelper.ClearImapFolder(Settings.Default.TestIMAPUser, Settings.Default.TestIMAPPass, ImapHelper.INBOXFolder, _responseSubject);
 }