예제 #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);
        }