Exemple #1
0
        public void TestSelectPublicFolder()
        {
            Application application = SingletonProvider<TestSetup>.Instance.GetApp();

             Account account1 = SingletonProvider<TestSetup>.Instance.AddAccount(_domain, "*****@*****.**", "test");

             IMAPFolders publicFolders = _settings.PublicFolders;
             IMAPFolder folder = publicFolders.Add("Share1");
             folder.Save();

             IMAPFolderPermission permission = folder.Permissions.Add();
             permission.PermissionAccountID = account1.ID;
             permission.PermissionType = eACLPermissionType.ePermissionTypeUser;
             permission.set_Permission(eACLPermission.ePermissionCreate, true);
             permission.Save();

             string folderName = "#Public.Share1.MySub1";
             var oSimulator1 = new IMAPClientSimulator();
             oSimulator1.Connect();
             oSimulator1.LogonWithLiteral(account1.Address, "test");
             CustomAssert.IsTrue(oSimulator1.CreateFolder(folderName));

             CustomAssert.IsFalse(oSimulator1.SelectFolderWithoutLiteral(folderName));

             oSimulator1.Disconnect();
        }