示例#1
0
        public void DisallowedSimpleTest()
        {
            var communication = new Communication {
                To = new EmailUser("*****@*****.**")
            };

            EmailDomainChecker.Check(communication, AllowedTestDomains);
        }
示例#2
0
        public void DisallowedExtraCharsTest()
        {
            var communication = new Communication {
                To = new EmailUser("<*****@*****.**>")
            };

            EmailDomainChecker.Check(communication, AllowedTestDomains);
        }
示例#3
0
        public void AllowedDomainsTest()
        {
            // The only allowed emails are now @test.linkme.net.au

            var communication = new Communication
            {
                To = new EmailUser("[email protected], <*****@*****.**>")
            };

            EmailDomainChecker.Check(communication, AllowedTestDomains);

            communication = new Communication
            {
                To = new EmailUser("Allowed Domain <*****@*****.**> ")
            };
            EmailDomainChecker.Check(communication, AllowedTestDomains);
        }