protected MailboxModel(int id, int tenant, IMailAddress address, IMailAccount account, ICollection<IMailAddress> aliases, MailServerBase server) : base(new MailAccountBase(account), new MailAddressBase(address), (aliases.Select(a => new MailAddressBase(a)).ToList())) { if (id < 0) throw new ArgumentException("Invalid domain id", "id"); if (tenant < 0) throw new ArgumentException("Invalid tenant id", "tenant"); if (account == null) throw new ArgumentException("Invalid account", "account"); if (address == null) throw new ArgumentException("Invalid address", "address"); if (aliases == null) throw new ArgumentException("Invalid aliases", "aliases"); if (server == null) throw new ArgumentException("Invalid server", "server"); Id = id; Tenant = tenant; Account = account; Address = address; Aliases = aliases; Server = server; }
public void SetUp() { server = TestContext.CreateServer(); peter_domain = server.CreateWebDomain(_peterDomainName, IS_VERIFIED, TestContext.ServerFactory); peter_address = TestContext.CreateRandomMailAddress(peter_domain); peter_account = TestContext.GetMailAccount(peter_address.LocalPart, _peterDomainName); }
protected WebDomainModel(int id, int tenant, string name, bool isVerified, MailServerBase server) : base(name) { if (id < 0) throw new ArgumentException("Negative domain teamlab id", "id"); Id = id; Tenant = tenant; Server = server; IsVerified = isVerified; }
public void Init() { server = TestContext.CreateServer(); peter_domain = server.CreateWebDomain(_peterDomainName, IS_VERIFIED, TestContext.ServerFactory); peter_mail_group_address = TestContext.CreateRandomMailAddress(peter_domain); var peterMailboxAddress = TestContext.CreateRandomMailAddress(peter_domain); var peterAccount = TestContext.GetMailAccount(peterMailboxAddress.LocalPart, _peterDomainName); peter_mailbox = server.CreateMailbox(peterMailboxAddress.LocalPart, PETER_PASSWORD, peterMailboxAddress.Domain, peterAccount, TestContext.ServerFactory); peter_mail_group = server.CreateMailGroup(peter_mail_group_address.LocalPart, peter_mail_group_address.Domain, new List<int> { peter_mailbox.Address.Id }, TestContext.ServerFactory); }
public void Init() { server = TestContext.CreateServer(); peter_domain = server.CreateWebDomain(_peterDomainName, IS_VERIFIED, TestContext.ServerFactory); peter_address = TestContext.CreateRandomMailAddress(peter_domain); peter_second_address = TestContext.CreateRandomMailAddress(peter_domain); peter_alias = TestContext.CreateRandomMailAddress(peter_domain); peter_account = TestContext.GetMailAccount(peter_address.LocalPart, _peterDomainName); peter_second_account = TestContext.GetMailAccount(peter_second_address.LocalPart, _peterDomainName); peter_mailbox = server.CreateMailbox(peter_address.LocalPart, PETER_PASSWORD, peter_domain, peter_account, TestContext.ServerFactory); peter_second_mailbox = server.CreateMailbox(peter_second_address.LocalPart, PETER_PASSWORD, peter_domain, peter_second_account, TestContext.ServerFactory); }
protected MailGroupModel(int id, int tenant, IMailAddress address, List<IMailAddress> inAddresses, MailServerBase server) : base(new MailAddressBase(address), (inAddresses.Select(a => new MailAddressBase(a)).ToList())) { if (id < 0) throw new ArgumentException("Invalid domain id", "id"); if (tenant < 0) throw new ArgumentException("Invalid tenant id", "tenant"); if (address == null) throw new ArgumentException("Invalid address", "address"); if (inAddresses == null) throw new ArgumentException("Invalid aliases", "inAddresses"); if (server == null) throw new ArgumentException("Invalid server", "server"); Id = id; Tenant = tenant; Address = address; InAddresses = inAddresses; Server = server; }
public MockMailGroup(int id, int tenant, IMailAddress address, List<IMailAddress> inAddresses, MailServerBase server) : base(id, tenant, address, inAddresses, server) { _serverData = MockServerData.GetInstance(); }
public MockMailbox(int id, int tenant, IMailAddress address, IMailAccount account, List<IMailAddress> aliases, MailServerBase server) : base(id, tenant, address, account, aliases, server) { _serverData = MockServerData.GetInstance(); }
public abstract IWebDomain CreateWebDomain(int id, int tenant, string name, bool isVerified, MailServerBase server);
public abstract IMailGroup CreateMailGroup(int id, int tenant, IMailAddress address, List<IMailAddress> inAddresses, MailServerBase server);
public abstract IMailbox CreateMailbox(int id, int tenant, IMailAddress address, IMailAccount account, List<IMailAddress> aliases, MailServerBase server);
public override IMailbox CreateMailbox(int id, int tenant, IMailAddress address, IMailAccount account, List<IMailAddress> aliases, MailServerBase server) { return new PostfixMailbox(id, tenant, address, account, aliases, server); }
public void Init() { _server = TestContext.CreateServer(); _petersDomain = _server.CreateWebDomain(_peterDomainName, IS_VERIFIED, TestContext.ServerFactory); _peterAddress = TestContext.CreateRandomMailAddress(_petersDomain); }
public PostfixMailbox(int id, int tenant, IMailAddress address, IMailAccount account, List<IMailAddress> aliases, MailServerBase server) : base(id, tenant, address, account, aliases, server) { }
public void Dispose() { server.DeleteWebDomain(peter_domain, TestContext.ServerFactory); server = null; }
public void Init() { server = TestContext.CreateServer(); peter_domain = server.CreateWebDomain(_peterDomainName, IS_VERIFIED, TestContext.ServerFactory); }
public override IWebDomain CreateWebDomain(int id, int tenant, string name, bool isVerified, MailServerBase server) { return new PostfixDomain(id, tenant, name, isVerified, server); }
public override IMailGroup CreateMailGroup(int id, int tenant, IMailAddress address, List<IMailAddress> inAddresses, MailServerBase server) { return new PostfixMailGroup(id, tenant, address, inAddresses, server); }
public PostfixDomain(int id, int tenant, string name, bool isVerified, MailServerBase server) : base(id, tenant, name, isVerified, server) { }
public void SetUp() { factory = TestContext.ServerFactory; server = TestContext.CreateServer(); }
public PostfixMailGroup(int id, int tenant, IMailAddress address, List<IMailAddress> inAddresses, MailServerBase server) : base(id, tenant, address, inAddresses, server) { }