diff --git a/src/Nager.PublicSuffix.TestConsole/Program.cs b/src/Nager.PublicSuffix.TestConsole/Program.cs index 56d3d67..6504b0e 100644 --- a/src/Nager.PublicSuffix.TestConsole/Program.cs +++ b/src/Nager.PublicSuffix.TestConsole/Program.cs @@ -51,4 +51,18 @@ Console.WriteLine($"{"RegistrableDomain:", 20} {domainInfo.RegistrableDomain}"); Console.WriteLine($"{"Subdomain:",20} {domainInfo.Subdomain}"); Console.WriteLine("------------------------------------------------"); -} \ No newline at end of file +} + + +var validDomains = new[] { "www.google.com", "amazon.com", "microsoft.de", "mail.google.com" }; +var invalidDomains = new[] { "www", "uk", "co.uk", ".", "test@test.com" }; + +foreach (var validDomain in validDomains) +{ + Console.WriteLine($"{validDomain} -> {domainParser.IsValidDomain(validDomain)}"); +} + +foreach (var invalidDomain in invalidDomains) +{ + Console.WriteLine($"{invalidDomain} -> {domainParser.IsValidDomain(invalidDomain)}"); +}