public void IsEmailAllowed_EmailDomainNotAllowedButTheSpecificEmailIs_EmailAllowed() { var sut = new EmailRestrictionsService(new[] { FakeEmailDomain }, new[] { AllowedEmail }); var result = sut.IsEmailAllowed(AllowedEmail); Assert.True(result); }
public void IsEmailAllowed_EmailDomainAllowed_EmailAllowed() { var sut = new EmailRestrictionsService(new[] { FakeEmailDomain }, new[] { AllowedEmail }); var result = sut.IsEmailAllowed(FakeEmail); Assert.True(result); }
public void IsEmailAllowed_InvalidEmailFormat_EmailNotAllowed() { var sut = new EmailRestrictionsService(new[] { FakeEmailDomain }, new string[0]); var result = sut.IsEmailAllowed(InvalidEmail); Assert.False(result); }
public void IsEmailAllowed_EmailDomainNotAllowedAndSpecificEmailNotAllowed_EmailNotAllowed() { var sut = new EmailRestrictionsService(new[] { FakeEmailDomain }, new[] { AllowedEmail }); var result = sut.IsEmailAllowed(NotAllowedEmail); Assert.False(result); }
public void IsEmailAllowed_AllowedEmailDomainsEmpty_AllEmailsAreAllowed(string email) { var sut = new EmailRestrictionsService(new string[0], new string[0]); var result = sut.IsEmailAllowed(email); Assert.True(result); }