コード例 #1
0
        public virtual void DeleteGroupsWithDomain()
        {
            var account   = TestContext.GetMailAccount("login", _peterDomainName);
            var mailbox   = server.CreateMailbox(PETER_LOGIN, PETER_PASSWORD, peter_domain, account, TestContext.ServerFactory);
            var mailgroup = server.CreateMailGroup(GROUP_LOGIN, peter_domain, new List <int> {
                mailbox.Address.Id
            }, TestContext.ServerFactory);

            server.DeleteWebDomain(peter_domain, TestContext.ServerFactory);
            Assert.IsNull(server.GetMailGroup(mailgroup.Id, TestContext.ServerFactory));
            Assert.IsNull(server.GetMailbox(mailbox.Id, TestContext.ServerFactory));
        }
コード例 #2
0
 public virtual void DoubleDeletingMailGroup()
 {
     server.DeleteMailGroup(peter_mail_group.Id, TestContext.ServerFactory);
     Assert.Throws <ArgumentException>(() => server.DeleteMailGroup(peter_mail_group.Id, TestContext.ServerFactory));
     Assert.IsNull(server.GetMailGroup(peter_mail_group.Id, TestContext.ServerFactory));
 }