public void AreDisposableConsideredFree() { Assert.NotNull(EmailSamples.Disposable); Assert.NotEmpty(EmailSamples.Disposable); foreach (var disposableEmail in EmailSamples.Disposable) { Assert.True(IsBizMail.IsFreeMailAddress(disposableEmail), $"{disposableEmail} is disposable"); } }
public void DoPatternsWork() { Assert.NotNull(EmailSamples.DomainPatterns); Assert.NotEmpty(EmailSamples.DomainPatterns); foreach (var patternEmail in EmailSamples.DomainPatterns) { Assert.True(IsBizMail.IsFreeMailAddress(patternEmail), $"{patternEmail} is free"); } }
public void AreFreeConsideredFree() { Assert.NotNull(EmailSamples.Free); Assert.NotEmpty(EmailSamples.Free); foreach (var freeEmail in EmailSamples.Free) { Assert.True(IsBizMail.IsFreeMailAddress(freeEmail), $"{freeEmail} is free"); } }
public void AreExceptionsThrown() { Assert.NotNull(EmailSamples.Throws); Assert.NotEmpty(EmailSamples.Throws); foreach (var errorTrigger in EmailSamples.Throws.Select(t => t as string).Concat(EmailSamples.Incomplete)) { Assert.Throws <ArgumentException>(() => { IsBizMail.IsFreeMailAddress(errorTrigger); }); } }