-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix timezone parsing in generic WHOIS template
- Loading branch information
Showing
49 changed files
with
522 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,90 +37,102 @@ public void Test_found() | |
Assert.Greater(sample.Length, 0); | ||
Assert.AreEqual(WhoisStatus.Found, response.Status); | ||
|
||
Assert.AreEqual(59, response.FieldsParsed); | ||
Assert.AreEqual(0, response.ParsingErrors); | ||
Assert.AreEqual("generic/tld/Found02", response.TemplateName); | ||
Assert.AreEqual("generic/tld/Found001", response.TemplateName); | ||
|
||
Assert.AreEqual("google.pro", response.DomainName); | ||
Assert.AreEqual("D107300000000011545-LRMS", response.RegistryDomainId); | ||
|
||
// Registrar Details | ||
Assert.AreEqual("MarkMonitor Inc.", response.Registrar.Name); | ||
Assert.AreEqual("292", response.Registrar.IanaId); | ||
Assert.AreEqual("http://www.markmonitor.com", response.Registrar.Url); | ||
|
||
Assert.AreEqual(new DateTime(2016, 2, 1, 15, 44, 3, DateTimeKind.Utc), response.Updated); | ||
Assert.AreEqual(new DateTime(2008, 7, 22, 0, 0, 0, DateTimeKind.Utc), response.Registered); | ||
Assert.AreEqual(new DateTime(2016, 9, 8, 0, 0, 0, DateTimeKind.Utc), response.Expiration); | ||
Assert.AreEqual(new DateTime(2016, 02, 01, 15, 44, 03, 000, DateTimeKind.Utc), response.Updated); | ||
Assert.AreEqual(new DateTime(2008, 07, 22, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered); | ||
Assert.AreEqual(new DateTime(2016, 09, 08, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration); | ||
|
||
// Registrant Details | ||
Assert.AreEqual("mmr-2383", response.Registrant.RegistryId); | ||
Assert.AreEqual("DNS Admin", response.Registrant.Name); | ||
Assert.AreEqual("Google Inc.", response.Registrant.Organization); | ||
Assert.AreEqual("+1.6502530000", response.Registrant.TelephoneNumber); | ||
Assert.AreEqual("+1.6506188571", response.Registrant.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.Registrant.Email); | ||
|
||
// Registrant Address | ||
Assert.AreEqual(5, response.Registrant.Address.Count); | ||
Assert.AreEqual("1600 Amphitheatre Parkway", response.Registrant.Address[0]); | ||
Assert.AreEqual("Mountain View", response.Registrant.Address[1]); | ||
Assert.AreEqual("CA", response.Registrant.Address[2]); | ||
Assert.AreEqual("94043", response.Registrant.Address[3]); | ||
Assert.AreEqual("US", response.Registrant.Address[4]); | ||
|
||
Assert.AreEqual("+1.6502530000", response.Registrant.TelephoneNumber); | ||
Assert.AreEqual("+1.6506188571", response.Registrant.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.Registrant.Email); | ||
|
||
// AdminContact Details | ||
Assert.AreEqual("mmr-2383", response.AdminContact.RegistryId); | ||
Assert.AreEqual("DNS Admin", response.AdminContact.Name); | ||
Assert.AreEqual("Google Inc.", response.AdminContact.Organization); | ||
Assert.AreEqual("+1.6502530000", response.AdminContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6506188571", response.AdminContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.AdminContact.Email); | ||
|
||
// AdminContact Address | ||
Assert.AreEqual(5, response.AdminContact.Address.Count); | ||
Assert.AreEqual("1600 Amphitheatre Parkway", response.AdminContact.Address[0]); | ||
Assert.AreEqual("Mountain View", response.AdminContact.Address[1]); | ||
Assert.AreEqual("CA", response.AdminContact.Address[2]); | ||
Assert.AreEqual("94043", response.AdminContact.Address[3]); | ||
Assert.AreEqual("US", response.AdminContact.Address[4]); | ||
|
||
Assert.AreEqual("+1.6502530000", response.AdminContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6506188571", response.AdminContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.AdminContact.Email); | ||
|
||
// BillingContact Details | ||
Assert.AreEqual("mmr-132627", response.BillingContact.RegistryId); | ||
Assert.AreEqual("CCOPS Billing", response.BillingContact.Name); | ||
Assert.AreEqual("MarkMonitor, Inc.", response.BillingContact.Organization); | ||
Assert.AreEqual("+1.2083895740", response.BillingContact.TelephoneNumber); | ||
Assert.AreEqual("+1.2083895771", response.BillingContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.BillingContact.Email); | ||
|
||
// BillingContact Address | ||
Assert.AreEqual(5, response.BillingContact.Address.Count); | ||
Assert.AreEqual("391 N. Ancestor Place", response.BillingContact.Address[0]); | ||
Assert.AreEqual("Boise", response.BillingContact.Address[1]); | ||
Assert.AreEqual("ID", response.BillingContact.Address[2]); | ||
Assert.AreEqual("83704", response.BillingContact.Address[3]); | ||
Assert.AreEqual("US", response.BillingContact.Address[4]); | ||
|
||
Assert.AreEqual("+1.2083895740", response.BillingContact.TelephoneNumber); | ||
Assert.AreEqual("+1.2083895771", response.BillingContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.BillingContact.Email); | ||
|
||
// TechnicalContact Details | ||
Assert.AreEqual("mmr-2383", response.TechnicalContact.RegistryId); | ||
Assert.AreEqual("DNS Admin", response.TechnicalContact.Name); | ||
Assert.AreEqual("Google Inc.", response.TechnicalContact.Organization); | ||
Assert.AreEqual("+1.6502530000", response.TechnicalContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6506188571", response.TechnicalContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.TechnicalContact.Email); | ||
|
||
// TechnicalContact Address | ||
Assert.AreEqual(5, response.TechnicalContact.Address.Count); | ||
Assert.AreEqual("1600 Amphitheatre Parkway", response.TechnicalContact.Address[0]); | ||
Assert.AreEqual("Mountain View", response.TechnicalContact.Address[1]); | ||
Assert.AreEqual("CA", response.TechnicalContact.Address[2]); | ||
Assert.AreEqual("94043", response.TechnicalContact.Address[3]); | ||
Assert.AreEqual("US", response.TechnicalContact.Address[4]); | ||
|
||
Assert.AreEqual("+1.6502530000", response.TechnicalContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6506188571", response.TechnicalContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.TechnicalContact.Email); | ||
|
||
|
||
// Nameservers | ||
Assert.AreEqual(2, response.NameServers.Count); | ||
Assert.AreEqual("ns1.google.com", response.NameServers[0]); | ||
Assert.AreEqual("ns2.google.com", response.NameServers[1]); | ||
|
||
// Domain Status | ||
Assert.AreEqual(3, response.DomainStatus.Count); | ||
Assert.AreEqual("clientDeleteProhibited", response.DomainStatus[0]); | ||
Assert.AreEqual("clientTransferProhibited", response.DomainStatus[1]); | ||
Assert.AreEqual("clientUpdateProhibited", response.DomainStatus[2]); | ||
|
||
Assert.AreEqual("unsigned", response.DnsSecStatus); | ||
Assert.AreEqual(59, response.FieldsParsed); | ||
} | ||
|
||
[Test] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,24 +42,28 @@ public void Test_found() | |
Assert.AreEqual(WhoisStatus.Found, response.Status); | ||
|
||
Assert.AreEqual(0, response.ParsingErrors); | ||
Assert.AreEqual("generic/tld/Found02", response.TemplateName); | ||
Assert.AreEqual("generic/tld/Found001", response.TemplateName); | ||
|
||
Assert.AreEqual("google.biz", response.DomainName); | ||
Assert.AreEqual("D2835288-BIZ", response.RegistryDomainId); | ||
|
||
// Registrar Details | ||
Assert.AreEqual("MarkMonitor, Inc.", response.Registrar.Name); | ||
Assert.AreEqual("292", response.Registrar.IanaId); | ||
Assert.AreEqual("[email protected]", response.Registrar.AbuseEmail); | ||
Assert.AreEqual("+1.2083895740", response.Registrar.AbuseTelephoneNumber); | ||
|
||
Assert.AreEqual(new DateTime(2017, 2, 22, 10, 27, 42, DateTimeKind.Utc), response.Updated); | ||
Assert.AreEqual(new DateTime(2002, 3, 27, 16, 3, 44, DateTimeKind.Utc), response.Registered); | ||
Assert.AreEqual(new DateTime(2018, 3, 26, 23, 59, 59, DateTimeKind.Utc), response.Expiration); | ||
Assert.AreEqual(new DateTime(2017, 02, 22, 10, 27, 42, 000, DateTimeKind.Utc), response.Updated); | ||
Assert.AreEqual(new DateTime(2002, 03, 27, 16, 03, 44, 000, DateTimeKind.Utc), response.Registered); | ||
Assert.AreEqual(new DateTime(2018, 03, 26, 23, 59, 59, 000, DateTimeKind.Utc), response.Expiration); | ||
|
||
// Registrant Details | ||
Assert.AreEqual("C42709140-BIZ", response.Registrant.RegistryId); | ||
Assert.AreEqual("DNS Admin", response.Registrant.Name); | ||
Assert.AreEqual("Google Inc.", response.Registrant.Organization); | ||
Assert.AreEqual("+1.6502530000", response.Registrant.TelephoneNumber); | ||
Assert.AreEqual("+1.6502530001", response.Registrant.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.Registrant.Email); | ||
|
||
// Registrant Address | ||
Assert.AreEqual(5, response.Registrant.Address.Count); | ||
|
@@ -69,15 +73,14 @@ public void Test_found() | |
Assert.AreEqual("94043", response.Registrant.Address[3]); | ||
Assert.AreEqual("US", response.Registrant.Address[4]); | ||
|
||
Assert.AreEqual("+1.6502530000", response.Registrant.TelephoneNumber); | ||
Assert.AreEqual("+1.6502530001", response.Registrant.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.Registrant.Email); | ||
|
||
|
||
// AdminContact Details | ||
Assert.AreEqual("C42709140-BIZ", response.AdminContact.RegistryId); | ||
Assert.AreEqual("DNS Admin", response.AdminContact.Name); | ||
Assert.AreEqual("Google Inc.", response.AdminContact.Organization); | ||
Assert.AreEqual("+1.6502530000", response.AdminContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6502530001", response.AdminContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.AdminContact.Email); | ||
|
||
// AdminContact Address | ||
Assert.AreEqual(5, response.AdminContact.Address.Count); | ||
|
@@ -87,15 +90,14 @@ public void Test_found() | |
Assert.AreEqual("94043", response.AdminContact.Address[3]); | ||
Assert.AreEqual("US", response.AdminContact.Address[4]); | ||
|
||
Assert.AreEqual("+1.6502530000", response.AdminContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6502530001", response.AdminContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.AdminContact.Email); | ||
|
||
|
||
// TechnicalContact Details | ||
Assert.AreEqual("C42709140-BIZ", response.TechnicalContact.RegistryId); | ||
Assert.AreEqual("DNS Admin", response.TechnicalContact.Name); | ||
Assert.AreEqual("Google Inc.", response.TechnicalContact.Organization); | ||
Assert.AreEqual("+1.6502530000", response.TechnicalContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6502530001", response.TechnicalContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.TechnicalContact.Email); | ||
|
||
// TechnicalContact Address | ||
Assert.AreEqual(5, response.TechnicalContact.Address.Count); | ||
|
@@ -105,9 +107,6 @@ public void Test_found() | |
Assert.AreEqual("94043", response.TechnicalContact.Address[3]); | ||
Assert.AreEqual("US", response.TechnicalContact.Address[4]); | ||
|
||
Assert.AreEqual("+1.6502530000", response.TechnicalContact.TelephoneNumber); | ||
Assert.AreEqual("+1.6502530001", response.TechnicalContact.FaxNumber); | ||
Assert.AreEqual("[email protected]", response.TechnicalContact.Email); | ||
|
||
// Nameservers | ||
Assert.AreEqual(4, response.NameServers.Count); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,24 +28,27 @@ public void Test_found() | |
Assert.AreEqual(WhoisStatus.Found, response.Status); | ||
|
||
Assert.AreEqual(0, response.ParsingErrors); | ||
Assert.AreEqual("generic/tld/Found02", response.TemplateName); | ||
Assert.AreEqual("generic/tld/Found001", response.TemplateName); | ||
|
||
Assert.AreEqual("cdmon.com", response.DomainName); | ||
|
||
// Registrar Details | ||
Assert.AreEqual("10DENCEHISPAHARD, S.L", response.Registrar.Name); | ||
Assert.AreEqual("1403", response.Registrar.IanaId); | ||
Assert.AreEqual("https://www.cdmon.com", response.Registrar.Url); | ||
Assert.AreEqual("whois.cdmon.com", response.Registrar.WhoisServerUrl); | ||
Assert.AreEqual("[email protected]", response.Registrar.AbuseEmail); | ||
Assert.AreEqual("+34.935677577", response.Registrar.AbuseTelephoneNumber); | ||
|
||
Assert.AreEqual(new DateTime(2009, 12, 16, 11, 40, 44, DateTimeKind.Utc), response.Updated); | ||
Assert.AreEqual(new DateTime(2001, 8, 12, 15, 2, 57, DateTimeKind.Utc), response.Registered); | ||
Assert.AreEqual(new DateTime(2024, 8, 12, 15, 2, 53, DateTimeKind.Utc), response.Expiration); | ||
Assert.AreEqual(new DateTime(2009, 12, 16, 11, 40, 44, 000, DateTimeKind.Utc), response.Updated); | ||
Assert.AreEqual(new DateTime(2001, 08, 12, 15, 02, 57, 000, DateTimeKind.Utc), response.Registered); | ||
Assert.AreEqual(new DateTime(2024, 08, 12, 15, 02, 53, 000, DateTimeKind.Utc), response.Expiration); | ||
|
||
// Registrant Details | ||
Assert.AreEqual("10dencehispahard,s.l.", response.Registrant.Name); | ||
Assert.AreEqual("10dencehispahard,s.l.", response.Registrant.Organization); | ||
Assert.AreEqual("+34.902364138", response.Registrant.TelephoneNumber); | ||
Assert.AreEqual("[email protected]", response.Registrant.Email); | ||
|
||
// Registrant Address | ||
Assert.AreEqual(4, response.Registrant.Address.Count); | ||
|
@@ -54,12 +57,12 @@ public void Test_found() | |
Assert.AreEqual("08380", response.Registrant.Address[2]); | ||
Assert.AreEqual("ES", response.Registrant.Address[3]); | ||
|
||
Assert.AreEqual("+34.902364138", response.Registrant.TelephoneNumber); | ||
Assert.AreEqual("[email protected]", response.Registrant.Email); | ||
|
||
// AdminContact Details | ||
Assert.AreEqual("10dencehispahard,s.l.", response.AdminContact.Name); | ||
Assert.AreEqual("10dencehispahard,s.l.", response.AdminContact.Organization); | ||
Assert.AreEqual("+34.902364138", response.AdminContact.TelephoneNumber); | ||
Assert.AreEqual("[email protected]", response.AdminContact.Email); | ||
|
||
// AdminContact Address | ||
Assert.AreEqual(4, response.AdminContact.Address.Count); | ||
|
@@ -68,12 +71,12 @@ public void Test_found() | |
Assert.AreEqual("08380", response.AdminContact.Address[2]); | ||
Assert.AreEqual("ES", response.AdminContact.Address[3]); | ||
|
||
Assert.AreEqual("+34.902364138", response.AdminContact.TelephoneNumber); | ||
Assert.AreEqual("[email protected]", response.AdminContact.Email); | ||
|
||
// TechnicalContact Details | ||
Assert.AreEqual("10dencehispahard,s.l.", response.TechnicalContact.Name); | ||
Assert.AreEqual("10dencehispahard,s.l.", response.TechnicalContact.Organization); | ||
Assert.AreEqual("+34.902364138", response.TechnicalContact.TelephoneNumber); | ||
Assert.AreEqual("[email protected]", response.TechnicalContact.Email); | ||
|
||
// TechnicalContact Address | ||
Assert.AreEqual(4, response.TechnicalContact.Address.Count); | ||
|
@@ -82,8 +85,6 @@ public void Test_found() | |
Assert.AreEqual("08380", response.TechnicalContact.Address[2]); | ||
Assert.AreEqual("ES", response.TechnicalContact.Address[3]); | ||
|
||
Assert.AreEqual("+34.902364138", response.TechnicalContact.TelephoneNumber); | ||
Assert.AreEqual("[email protected]", response.TechnicalContact.Email); | ||
|
||
// Nameservers | ||
Assert.AreEqual(3, response.NameServers.Count); | ||
|
Oops, something went wrong.