Exemplo n.º 1
0
        public void Test_error()
        {
            var sample   = SampleReader.Read("whois.dns.be", "be", "error.txt");
            var response = parser.Parse("whois.dns.be", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Error, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.dns.be/be/Error", response.TemplateName);

            Assert.AreEqual("www.kimdemolenaer.be", response.DomainName.ToString());

            Assert.AreEqual(2, response.FieldsParsed);
        }
Exemplo n.º 2
0
        public void Test_not_found_status_available()
        {
            var sample   = SampleReader.Read("whois.nic.net.sb", "sb", "not_found_status_available.txt");
            var response = parser.Parse("whois.nic.net.sb", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.NotFound, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("generic/tld/NotFound005", response.TemplateName);

            Assert.AreEqual("u34jedzcq.sb", response.DomainName.ToString());

            Assert.AreEqual(2, response.FieldsParsed);
        }
Exemplo n.º 3
0
        public void Test_not_found()
        {
            var sample   = SampleReader.Read("whois.dns.be", "be", "not_found.txt");
            var response = parser.Parse("whois.dns.be", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.NotFound, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.dns.be/be/NotFound", response.TemplateName);

            Assert.AreEqual("u34jedzcq.be", response.DomainName.ToString());

            Assert.AreEqual(2, response.FieldsParsed);
        }
Exemplo n.º 4
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.registro.br", "br", "found.txt");
            var response = parser.Parse("whois.registro.br", "br", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisResponseStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.registro.br/br/Found", response.TemplateName);

            Assert.AreEqual("hostgator.com.br", response.DomainName);

            // Registrar Details
            Assert.AreEqual("HOSTGATOR-BRASIL (43)", response.Registrar.Name);
            Assert.AreEqual("*****@*****.**", response.Registrar.AbuseEmail);

            Assert.AreEqual(new DateTime(2011, 5, 9, 0, 0, 0), response.Updated);
            Assert.AreEqual(new DateTime(2005, 9, 12, 0, 0, 0), response.Registered);
            Assert.AreEqual(new DateTime(2018, 9, 12, 0, 0, 0), response.Expiration);

            // Registrant Details
            Assert.AreEqual("008.852.780/0001-00", response.Registrant.RegistryId);
            Assert.AreEqual("Robledo Ribeiro Aloisio", response.Registrant.Name);
            Assert.AreEqual("Hostgator Brasil Hospedagem e suporte tecnico LTDA", response.Registrant.Organization);

            // AdminContact Details
            Assert.AreEqual("HOBRA", response.AdminContact.Name);

            // BillingContact Details
            Assert.AreEqual("HOBRA", response.BillingContact.Name);

            // TechnicalContact Details
            Assert.AreEqual("HOBRA", response.TechnicalContact.Name);

            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.hostgator.com.br", response.NameServers[0]);
            Assert.AreEqual("ns2.hostgator.com.br", response.NameServers[1]);
            Assert.AreEqual("ns3.hostgator.com.br", response.NameServers[2]);
            Assert.AreEqual("ns4.hostgator.com.br", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("published", response.DomainStatus[0]);

            Assert.AreEqual(18, response.FieldsParsed);
        }
Exemplo n.º 5
0
        public void Test_other_status_dom_warn()
        {
            var sample   = SampleReader.Read("whois.sk-nic.sk", "sk", "other_status_dom_warn.txt");
            var response = parser.Parse("whois.sk-nic.sk", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Other, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.sk-nic.sk/sk/Found", response.TemplateName);

            Assert.AreEqual("e-biznis.sk", response.DomainName.ToString());

            Assert.AreEqual(new DateTime(2011, 07, 30, 00, 00, 00, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(2011, 08, 27, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // AdminContact Details
            Assert.AreEqual("EVEC-0001", response.AdminContact.RegistryId);
            Assert.AreEqual("eVector s.r.o.", response.AdminContact.Name);
            Assert.AreEqual("421-37-6578941", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);

            // AdminContact Address
            Assert.AreEqual(1, response.AdminContact.Address.Count);
            Assert.AreEqual("Coboriho 2, Nitra 94901", response.AdminContact.Address[0]);


            // TechnicalContact Details
            Assert.AreEqual("BEES-0002", response.TechnicalContact.RegistryId);
            Assert.AreEqual("BeeSoft s.r.o.", response.TechnicalContact.Name);
            Assert.AreEqual("421264530707", response.TechnicalContact.TelephoneNumber);

            // TechnicalContact Address
            Assert.AreEqual(1, response.TechnicalContact.Address.Count);
            Assert.AreEqual("Lamacska cesta 20, Bratislava 84103", response.TechnicalContact.Address[0]);


            // Nameservers
            Assert.AreEqual(2, response.NameServers.Count);
            Assert.AreEqual("ns1.beesoft.sk", response.NameServers[0]);
            Assert.AreEqual("ns2.beesoft.sk", response.NameServers[1]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("DOM_WARN", response.DomainStatus[0]);

            Assert.AreEqual(16, response.FieldsParsed);
        }
Exemplo n.º 6
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.nic.dz", "dz", "found.txt");
            var response = parser.Parse("whois.nic.dz", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.nic.dz/dz/Found", response.TemplateName);

            Assert.AreEqual("google.dz", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("cerist", response.Registrar.Name);

            Assert.AreEqual(new DateTime(2007, 01, 10, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered);

            // Registrant Details
            Assert.AreEqual("GOOGLE LLC", response.Registrant.Name);


            // AdminContact Details
            Assert.AreEqual("Domain Administrator", response.AdminContact.Name);
            Assert.AreEqual("GOOGLE LLC", response.AdminContact.Organization);
            Assert.AreEqual("+16502530000", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("+16502530000", response.AdminContact.FaxNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);

            // AdminContact Address
            Assert.AreEqual(1, response.AdminContact.Address.Count);
            Assert.AreEqual("1600 Amphitheatre Parkway, Mountain View, CA 94043 US", response.AdminContact.Address[0]);


            // TechnicalContact Details
            Assert.AreEqual("Domain AdmDomain Administratorinistrator", response.TechnicalContact.Name);
            Assert.AreEqual("MARKMONITOR INC", response.TechnicalContact.Organization);
            Assert.AreEqual("+12083895740", response.TechnicalContact.TelephoneNumber);
            Assert.AreEqual("+12083895771", response.TechnicalContact.FaxNumber);
            Assert.AreEqual("*****@*****.**", response.TechnicalContact.Email);

            // TechnicalContact Address
            Assert.AreEqual(1, response.TechnicalContact.Address.Count);
            Assert.AreEqual("391 N Ancestor Place Boise, ID 83704 US", response.TechnicalContact.Address[0]);


            Assert.AreEqual(17, response.FieldsParsed);
        }
Exemplo n.º 7
0
        public void Test_found()
        {
            var sample = SampleReader.Read("whois.tld.ee", "ee", "found.txt");
            var response = parser.Parse("whois.tld.ee", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            AssertWriter.Write(response);
            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.tld.ee/ee/Found", response.TemplateName);

            Assert.AreEqual("internet.ee", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("Elisa Eesti AS", response.Registrar.Name);
            Assert.AreEqual("http://www.elisa.ee", response.Registrar.Url);
            Assert.AreEqual("+372 660 0600", response.Registrar.AbuseTelephoneNumber);

            Assert.AreEqual(new DateTime(2010, 11, 29, 11, 32, 16, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(2010, 08, 10, 13, 43, 38, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2017, 02, 04, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

             // Registrant Details
            Assert.AreEqual("Eesti Interneti Sihtasutus", response.Registrant.Name);
            Assert.AreEqual(new DateTime(2010, 11, 29, 11, 32, 16, 000, DateTimeKind.Utc), response.Registrant.Updated);


             // AdminContact Details
            Assert.AreEqual("Jaana Järve", response.AdminContact.Name);
            Assert.AreEqual(new DateTime(2015, 10, 30, 06, 31, 21, 000, DateTimeKind.Utc), response.AdminContact.Updated);


             // TechnicalContact Details
            Assert.AreEqual("Jaana Järve", response.TechnicalContact.Name);
            Assert.AreEqual(new DateTime(2015, 10, 30, 06, 31, 21, 000, DateTimeKind.Utc), response.TechnicalContact.Updated);


            // Nameservers
            Assert.AreEqual(1, response.NameServers.Count);
            Assert.AreEqual("c.tld.ee", response.NameServers[0]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("ok (paid and in zone)", response.DomainStatus[0]);

            Assert.AreEqual(16, response.FieldsParsed);
        }
Exemplo n.º 8
0
        public void Test_found_status_registered()
        {
            var sample   = SampleReader.Read("whois.jprs.jp", "jp", "found_status_registered.txt");
            var response = parser.Parse("whois.jprs.jp", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.jprs.jp/Found02", response.TemplateName);

            Assert.AreEqual("google.jp", response.DomainName.ToString());

            Assert.AreEqual(new DateTime(2013, 06, 01, 01, 05, 07, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(2005, 05, 30, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2014, 05, 31, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("Google Inc.", response.Registrant.Name);


            // AdminContact Details
            Assert.AreEqual("Google Inc.", response.AdminContact.Name);
            Assert.AreEqual("16502530000", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("16502530001", response.AdminContact.FaxNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);

            // AdminContact Address
            Assert.AreEqual(4, response.AdminContact.Address.Count);
            Assert.AreEqual("94043", response.AdminContact.Address[0]);
            Assert.AreEqual("Mountain View", response.AdminContact.Address[1]);
            Assert.AreEqual("1600 Amphitheatre Parkway", response.AdminContact.Address[2]);
            Assert.AreEqual("US", response.AdminContact.Address[3]);


            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("Active", response.DomainStatus[0]);

            Assert.AreEqual(19, response.FieldsParsed);
        }
Exemplo n.º 9
0
        public void Test_found_status_registered()
        {
            var sample   = SampleReader.Read("whois.sgnic.sg", "sg", "found_status_registered.txt");
            var response = parser.Parse("whois.sgnic.sg", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.sgnic.sg/sg/Found02", response.TemplateName);

            Assert.AreEqual("google.sg", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("MARKMONITOR INC", response.Registrar.Name);

            Assert.AreEqual(new DateTime(2005, 01, 03, 12, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2020, 01, 03, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("GOOGLE LLC", response.Registrant.Name);


            // AdminContact Details
            Assert.AreEqual("MARKMONITOR INC.", response.AdminContact.Name);


            // TechnicalContact Details
            Assert.AreEqual("GOOGLE LLC", response.TechnicalContact.Name);


            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(5, response.DomainStatus.Count);
            Assert.AreEqual("OK", response.DomainStatus[0]);
            Assert.AreEqual("CLIENT UPDATE PROHIBITED", response.DomainStatus[1]);
            Assert.AreEqual("CLIENT TRANSFER PROHIBITED", response.DomainStatus[2]);
            Assert.AreEqual("CLIENT DELETE PROHIBITED", response.DomainStatus[3]);
            Assert.AreEqual("VerifiedID@SG-Not Required", response.DomainStatus[4]);

            Assert.AreEqual(17, response.FieldsParsed);
        }
Exemplo n.º 10
0
        public void Test_unconfirmed()
        {
            var sample   = SampleReader.Read("whois.co.ug", "ug", "unconfirmed.txt");
            var response = parser.Parse("whois.co.ug", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Unconfirmed, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.co.ug/ug/Found", response.TemplateName);

            Assert.AreEqual("youtube.ug", response.DomainName.ToString());

            Assert.AreEqual(new DateTime(2011, 11, 01, 23, 27, 38, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(2011, 11, 01, 00, 00, 00, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2013, 11, 01, 00, 00, 00, DateTimeKind.Utc), response.Expiration);

            // AdminContact Details
            Assert.AreEqual("DNS Admin", response.AdminContact.Name);
            Assert.AreEqual("+1.6502530000", response.AdminContact.TelephoneNumber);

            // AdminContact Address
            Assert.AreEqual(1, response.AdminContact.Address.Count);
            Assert.AreEqual("1600 Amphitheatre Parkway", response.AdminContact.Address[0]);


            // TechnicalContact Details
            Assert.AreEqual("DNS Admin", response.TechnicalContact.Name);
            Assert.AreEqual("+1.6502530000", response.TechnicalContact.TelephoneNumber);

            // TechnicalContact Address
            Assert.AreEqual(1, response.TechnicalContact.Address.Count);
            Assert.AreEqual("1600 Amphitheatre Parkway", response.TechnicalContact.Address[0]);


            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("UNCONFIRMED", response.DomainStatus[0]);

            Assert.AreEqual(18, response.FieldsParsed);
        }
Exemplo n.º 11
0
        public void Test_not_found()
        {
            var sample   = SampleReader.Read("kero.yachay.pe", "pe", "not_found.txt");
            var response = parser.Parse("kero.yachay.pe", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.NotFound, response.Status);

            Assert.AreEqual(3, response.FieldsParsed);
            Assert.AreEqual(0, response.ParsingErrors);

            Assert.AreEqual("u34jedzcq.pe", response.DomainName.ToString());

            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("Not Registered", response.DomainStatus[0]);
        }
Exemplo n.º 12
0
        public override void Close()
        {
            this.samplereader = null;

            if (this.mapfile != null)
            {
                this.mapfile.Dispose();
                this.mapfile = null;
            }

            if (this.csvfile != null)
            {
                this.csvfile.Dispose();
                this.csvfile = null;
            }
        }
Exemplo n.º 13
0
        public void Test_not_found()
        {
            var sample   = SampleReader.Read("whois1.nic.bi", "bi", "not_found.txt");
            var response = parser.Parse("whois1.nic.bi", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.NotFound, response.Status);

            AssertWriter.Write(response);
            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("generic/tld/NotFound004", response.TemplateName);

            Assert.AreEqual("u34jedzcq.bi", response.DomainName.ToString());

            Assert.AreEqual(2, response.FieldsParsed);
        }
Exemplo n.º 14
0
        public void Test_other_status_serverhold()
        {
            var sample = SampleReader.Read("whois.tld.ee", "ee", "other_status_serverhold.txt");
            var response = parser.Parse("whois.tld.ee", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Expired, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.tld.ee/ee/Found", response.TemplateName);

            Assert.AreEqual("samanacrafts.ee", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("Edicy OÜ", response.Registrar.Name);
            Assert.AreEqual("http://www.edicy.com", response.Registrar.Url);
            Assert.AreEqual("+3727460064", response.Registrar.AbuseTelephoneNumber);

            Assert.AreEqual(new DateTime(2014, 11, 01, 18, 38, 55, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(2014, 11, 01, 18, 38, 55, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2015, 11, 01, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

             // Registrant Details
            Assert.AreEqual("Anastassia Hisamova", response.Registrant.Name);
            Assert.AreEqual(new DateTime(2014, 11, 01, 18, 38, 55, 000, DateTimeKind.Utc), response.Registrant.Updated);


             // AdminContact Details
            Assert.AreEqual("Anastassia Hisamova", response.AdminContact.Name);
            Assert.AreEqual(new DateTime(2014, 11, 01, 18, 38, 55, 000, DateTimeKind.Utc), response.AdminContact.Updated);


             // TechnicalContact Details
            Assert.AreEqual(new DateTime(2014, 11, 01, 18, 38, 55, 000, DateTimeKind.Utc), response.TechnicalContact.Updated);


            // Nameservers
            Assert.AreEqual(1, response.NameServers.Count);
            Assert.AreEqual("ns4.edicy.net", response.NameServers[0]);

            // Domain Status
            Assert.AreEqual(2, response.DomainStatus.Count);
            Assert.AreEqual("expired", response.DomainStatus[0]);
            Assert.AreEqual("serverHold", response.DomainStatus[1]);

            Assert.AreEqual(16, response.FieldsParsed);
        }
Exemplo n.º 15
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.iis.se", "se", "found.txt");
            var response = parser.Parse("whois.iis.se", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.iis.se/se/Found", response.TemplateName);

            Assert.AreEqual("populiscreate.se", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("EuroDNS S.A", response.Registrar.Name);

            Assert.AreEqual(new DateTime(2010, 08, 05, 00, 00, 00, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2011, 08, 05, 00, 00, 00, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("eds1008-4130626", response.Registrant.RegistryId);


            // AdminContact Details
            Assert.AreEqual("eds0903-00001", response.AdminContact.RegistryId);


            // BillingContact Details
            Assert.AreEqual("eds0903-00001", response.BillingContact.RegistryId);


            // TechnicalContact Details
            Assert.AreEqual("eds0903-00002", response.TechnicalContact.RegistryId);


            // Nameservers
            Assert.AreEqual(2, response.NameServers.Count);
            Assert.AreEqual("ns2.eurodns.com", response.NameServers[0]);
            Assert.AreEqual("ns1.eurodns.com", response.NameServers[1]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("active", response.DomainStatus[0]);

            Assert.AreEqual("unsigned delegation", response.DnsSecStatus);
            Assert.AreEqual(13, response.FieldsParsed);
        }
Exemplo n.º 16
0
        public void Test_found_status_registered()
        {
            var sample   = SampleReader.Read("whois.registro.br", "br", "found_status_registered.txt");
            var response = parser.Parse("whois.registro.br", "br", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisResponseStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.registro.br/br/Found", response.TemplateName);

            Assert.AreEqual("google.com.br", response.DomainName);

            // Registrar Details
            Assert.AreEqual("*****@*****.**", response.Registrar.AbuseEmail);

            Assert.AreEqual(new DateTime(2017, 4, 27, 0, 0, 0), response.Updated);
            Assert.AreEqual(new DateTime(1999, 5, 18, 0, 0, 0), response.Registered);
            Assert.AreEqual(new DateTime(2018, 5, 18, 0, 0, 0), response.Expiration);

            // Registrant Details
            Assert.AreEqual("06.990.590/0001-23", response.Registrant.RegistryId);
            Assert.AreEqual("Domain Administrator", response.Registrant.Name);
            Assert.AreEqual("Google Brasil Internet Ltda", response.Registrant.Organization);

            // AdminContact Details
            Assert.AreEqual("DOADM17", response.AdminContact.Name);

            // BillingContact Details
            Assert.AreEqual("NAB51", response.BillingContact.Name);

            // TechnicalContact Details
            Assert.AreEqual("DOADM17", response.TechnicalContact.Name);

            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("published", response.DomainStatus[0]);

            Assert.AreEqual(17, response.FieldsParsed);
        }
Exemplo n.º 17
0
        public void Test_found_ameblo_jp()
        {
            var sample = SampleReader.Read("whois.jprs.jp", "jp", "ameblo.jp.txt");

            var response = parser.Parse("whois.jprs.jp", "jp", sample);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.jprs.jp/jp/Found", response.TemplateName);

            Assert.AreEqual("ameblo.jp", response.DomainName);

            Assert.AreEqual(new DateTime(2018, 8, 1, 1, 5, 9), response.Updated);
            Assert.AreEqual(new DateTime(2004, 7, 30, 0, 0, 0), response.Registered);
            Assert.AreEqual(new DateTime(2019, 7, 31, 0, 0, 0), response.Expiration);

            // Registrant Details
            Assert.AreEqual("CyberAgent, Inc.", response.Registrant.Name);

            // AdminContact Details
            Assert.AreEqual("CyberAgent, Inc.", response.AdminContact.Name);

            // AdminContact Address
            Assert.AreEqual(4, response.AdminContact.Address.Count);
            Assert.AreEqual("150-0044", response.AdminContact.Address[0]);
            Assert.AreEqual("Shibuya-ku", response.AdminContact.Address[1]);
            Assert.AreEqual("19-1 Maruyamacho", response.AdminContact.Address[2]);
            Assert.AreEqual("Shibuya Prime Plaza 2F", response.AdminContact.Address[3]);

            Assert.AreEqual("03-5459-6150", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("03-5784-7070", response.AdminContact.FaxNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);

            // Nameservers
            Assert.AreEqual(6, response.NameServers.Count);
            Assert.AreEqual("a1-5.akam.net", response.NameServers[0]);
            Assert.AreEqual("a11-66.akam.net", response.NameServers[1]);
            Assert.AreEqual("a20-67.akam.net", response.NameServers[2]);
            Assert.AreEqual("a4-64.akam.net", response.NameServers[3]);
            Assert.AreEqual("a6-65.akam.net", response.NameServers[4]);
            Assert.AreEqual("a7-66.akam.net", response.NameServers[5]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("Active", response.DomainStatus[0]);

            Assert.AreEqual(21, response.FieldsParsed);
        }
Exemplo n.º 18
0
        public void Test_found_contact_person()
        {
            var sample   = SampleReader.Read("whois.nic.tr", "tr", "found_contact_person.txt");
            var response = parser.Parse("whois.nic.tr", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.nic.tr/tr/Found", response.TemplateName);


            Assert.AreEqual(new DateTime(2009, 11, 16, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2010, 11, 15, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("Sevdin Filiz", response.Registrant.Name);
            Assert.AreEqual("+ 90-212-6116571-", response.Registrant.TelephoneNumber);
            Assert.AreEqual("*****@*****.**", response.Registrant.Email);

            // Registrant Address
            Assert.AreEqual(3, response.Registrant.Address.Count);
            Assert.AreEqual("Çýnar mh. 10.sok", response.Registrant.Address[0]);
            Assert.AreEqual("Ýstanbul,", response.Registrant.Address[1]);
            Assert.AreEqual("Türkiye", response.Registrant.Address[2]);


            // AdminContact Details
            Assert.AreEqual("sf256-metu", response.AdminContact.RegistryId);


            // BillingContact Details
            Assert.AreEqual("sf256-metu", response.BillingContact.RegistryId);


            // TechnicalContact Details
            Assert.AreEqual("sf256-metu", response.TechnicalContact.RegistryId);


            // Nameservers
            Assert.AreEqual(2, response.NameServers.Count);
            Assert.AreEqual("ns1.phpsunucu.com", response.NameServers[0]);
            Assert.AreEqual("ns2.phpsunucu.com", response.NameServers[1]);

            Assert.AreEqual(14, response.FieldsParsed);
        }
Exemplo n.º 19
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.ati.tn", "tn", "found.txt");
            var response = parser.Parse("whois.ati.tn", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(18, response.FieldsParsed);
            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.ati.tn/tn/Found", response.TemplateName);

            Assert.AreEqual("equipements-pro.com.tn", response.DomainName.ToString());

            Assert.AreEqual("I-HOSTERS", response.Registrar.Name);

            Assert.AreEqual(new DateTime(2013, 12, 13, 22, 15, 8), response.Registered);
            Assert.AreEqual("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh", response.Registrant.Name);

            Assert.AreEqual(1, response.Registrant.Address.Count);
            Assert.AreEqual("complexe commercial Boukris 2 rue Om Larayes", response.Registrant.Address[0]);

            Assert.AreEqual("98639096", response.Registrant.TelephoneNumber);
            Assert.AreEqual("*****@*****.**", response.Registrant.Email);

            Assert.AreEqual("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh", response.AdminContact.Name);

            Assert.AreEqual(1, response.AdminContact.Address.Count);
            Assert.AreEqual("complexe commercial Boukris 2 rue Om Larayes", response.AdminContact.Address[0]);

            Assert.AreEqual("98639096", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);

            Assert.AreEqual("MAISON DE BIEN HOTELIERS ET EQ Farhat Riadh", response.TechnicalContact.Name);

            Assert.AreEqual(1, response.TechnicalContact.Address.Count);
            Assert.AreEqual("complexe commercial Boukris 2 rue Om Larayes", response.TechnicalContact.Address[0]);

            Assert.AreEqual("98639096", response.TechnicalContact.TelephoneNumber);
            Assert.AreEqual("*****@*****.**", response.TechnicalContact.Email);


            Assert.AreEqual(2, response.NameServers.Count);
            Assert.AreEqual("ns.steerbook.com", response.NameServers[0]);
            Assert.AreEqual("dns.steerbook.com", response.NameServers[1]);
        }
Exemplo n.º 20
0
        public void StartCapture()
        {
            //Checks to make sure that the camera has not already been started
            if (Status != CameraStatus.Stopped)
            {
                throw new InvalidOperationException("A camera cannot be started if it is already running");
            }

            //Updates the status
            Status = CameraStatus.Running;

            //Initialize the sense manager and streams
            SampleStream = SampleReader.Activate(SMInstance);
            SampleStream.EnableStream(StreamType.STREAM_TYPE_COLOR, WIDTH, HEIGHT, FPS, StreamOption.STREAM_OPTION_STRONG_STREAM_SYNC);
            SampleStream.EnableStream(StreamType.STREAM_TYPE_DEPTH, WIDTH, HEIGHT, FPS, StreamOption.STREAM_OPTION_STRONG_STREAM_SYNC);
            SMInstance.Init();
        }
Exemplo n.º 21
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.ja.net", "ac.uk", "found.txt");
            var response = parser.Parse("whois.ja.net", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.ja.net/Found", response.TemplateName);

            Assert.AreEqual("lboro.ac.uk", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("Jisc Collections and Janet Limited", response.Registrar.Name);

            Assert.AreEqual(new DateTime(2013, 03, 20, 00, 00, 00, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(2003, 11, 07, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2014, 06, 16, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("Loughborough University", response.Registrant.Name);


            // AdminContact Details
            Assert.AreEqual("M S Cook", response.AdminContact.Name);
            Assert.AreEqual("+44 1509 223498", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("+44 1509 223989", response.AdminContact.FaxNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);

            // AdminContact Address
            Assert.AreEqual(3, response.AdminContact.Address.Count);
            Assert.AreEqual("Computing Services, Loughborough University, Loughborough, Leicestershire", response.AdminContact.Address[0]);
            Assert.AreEqual("LE11 3TU", response.AdminContact.Address[1]);
            Assert.AreEqual("United Kingdom", response.AdminContact.Address[2]);


            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("agate.lut.ac.uk", response.NameServers[0]);
            Assert.AreEqual("bgate.lut.ac.uk", response.NameServers[1]);
            Assert.AreEqual("cgate.lut.ac.uk", response.NameServers[2]);
            Assert.AreEqual("ns3.ja.net", response.NameServers[3]);

            Assert.AreEqual(18, response.FieldsParsed);
        }
Exemplo n.º 22
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.jprs.jp", "jp", "found.txt");
            var response = parser.Parse("whois.jprs.jp", "jp", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisResponseStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.jprs.jp/jp/Found", response.TemplateName);

            Assert.AreEqual("fashionwatch.jp", response.DomainName);

            Assert.AreEqual(new DateTime(2010, 10, 18, 11, 30, 47), response.Updated);
            Assert.AreEqual(new DateTime(2009, 5, 11, 0, 0, 0), response.Registered);
            Assert.AreEqual(new DateTime(2011, 5, 31, 0, 0, 0), response.Expiration);

            // Registrant Details
            Assert.AreEqual("coco coco", response.Registrant.Name);


            // AdminContact Details
            Assert.AreEqual("coco coco", response.AdminContact.Name);

            // AdminContact Address
            Assert.AreEqual(4, response.AdminContact.Address.Count);
            Assert.AreEqual("166-0002", response.AdminContact.Address[0]);
            Assert.AreEqual("3-43-13 Koenji-kita", response.AdminContact.Address[1]);
            Assert.AreEqual("Suginami-ku", response.AdminContact.Address[2]);
            Assert.AreEqual("Tokyo", response.AdminContact.Address[3]);

            Assert.AreEqual("1312748435", response.AdminContact.TelephoneNumber);
            Assert.AreEqual("*****@*****.**", response.AdminContact.Email);


            // Nameservers
            Assert.AreEqual(2, response.NameServers.Count);
            Assert.AreEqual("ns172.ip-asia.com", response.NameServers[0]);
            Assert.AreEqual("ns171.ip-asia.com", response.NameServers[1]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("Active", response.DomainStatus[0]);

            Assert.AreEqual(16, response.FieldsParsed);
        }
Exemplo n.º 23
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.nic.hu", "hu", "found.txt");
            var response = parser.Parse("whois.nic.hu", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.nic.hu/hu/Found", response.TemplateName);

            Assert.AreEqual("google.hu", response.DomainName.ToString());

            Assert.AreEqual(new DateTime(2000, 03, 25, 23, 20, 39, 000, DateTimeKind.Utc), response.Registered);

            Assert.AreEqual(3, response.FieldsParsed);
        }
Exemplo n.º 24
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.centralnic.com", "uy.com", "found.txt");
            var response = parser.Parse("whois.centralnic.com", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.centralnic.com/Found", response.TemplateName);

            Assert.AreEqual("bingo.uy.com", response.DomainName.ToString());
            Assert.AreEqual("CNIC-DO705337", response.RegistryDomainId);

            // Registrar Details
            Assert.AreEqual("Domain Exploitation International", response.Registrar.Name);


            // Registrant Details
            Assert.AreEqual("H122681", response.Registrant.RegistryId);


            // AdminContact Details
            Assert.AreEqual("H122681", response.AdminContact.RegistryId);


            // BillingContact Details
            Assert.AreEqual("H122681", response.BillingContact.RegistryId);


            // TechnicalContact Details
            Assert.AreEqual("H122681", response.TechnicalContact.RegistryId);


            // Nameservers
            Assert.AreEqual(2, response.NameServers.Count);
            Assert.AreEqual("ns2.domain-exploitation.us.com", response.NameServers[0]);
            Assert.AreEqual("ns1.domain-exploitation.us.com", response.NameServers[1]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("OK", response.DomainStatus[0]);

            Assert.AreEqual("Unsigned", response.DnsSecStatus);
            Assert.AreEqual(12, response.FieldsParsed);
        }
Exemplo n.º 25
0
        public void Test_found_status_registered()
        {
            var sample   = SampleReader.Read("whois.nic.uk", "uk", "found_status_registered.txt");
            var response = parser.Parse("whois.nic.uk", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.nic.uk/uk/Found", response.TemplateName);

            Assert.AreEqual("google.co.uk", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("Markmonitor Inc. t/a Markmonitor [Tag = MARKMONITOR]", response.Registrar.Name);
            Assert.AreEqual("http://www.markmonitor.com", response.Registrar.Url);

            Assert.AreEqual(new DateTime(2014, 01, 13, 00, 00, 00, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(1999, 02, 14, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2015, 02, 14, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("Google Inc.", response.Registrant.Name);

            // 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("United States", response.Registrant.Address[4]);


            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("Registered until expiry date.", response.DomainStatus[0]);

            Assert.AreEqual(18, response.FieldsParsed);
        }
Exemplo n.º 26
0
        public void Test_reserved()
        {
            var sample   = SampleReader.Read("whois.domainregistry.ie", "ie", "reserved.txt");
            var response = parser.Parse("whois.domainregistry.ie", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Reserved, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.domainregistry.ie/ie/Reserved", response.TemplateName);

            Assert.AreEqual("peter.ie", response.DomainName.ToString());

            Assert.AreEqual(new DateTime(2012, 04, 17, 00, 00, 00, DateTimeKind.Utc), response.Expiration);

            Assert.AreEqual(3, response.FieldsParsed);
        }
Exemplo n.º 27
0
        public void Test_other_status_no_longer_required()
        {
            var sample   = SampleReader.Read("whois.nic.uk", "uk", "other_status_no_longer_required.txt");
            var response = parser.Parse("whois.nic.uk", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Other, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.nic.uk/uk/Found", response.TemplateName);

            Assert.AreEqual("atlasholidays.co.uk", response.DomainName.ToString());

            // Registrar Details
            Assert.AreEqual("Print Copy Systems Limited t/a Lan Systems [Tag = LANSYSTEMS]", response.Registrar.Name);
            Assert.AreEqual("http://www.lansystems.co.uk", response.Registrar.Url);

            Assert.AreEqual(new DateTime(2013, 05, 01, 00, 00, 00, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(1999, 04, 16, 00, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2013, 04, 16, 00, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Registrant Details
            Assert.AreEqual("Atlas Associates", response.Registrant.Name);

            // Registrant Address
            Assert.AreEqual(5, response.Registrant.Address.Count);
            Assert.AreEqual("The PC Clinic (UK) Ltd., 1 Hinckley Road,", response.Registrant.Address[0]);
            Assert.AreEqual("Sapcote", response.Registrant.Address[1]);
            Assert.AreEqual("Leicestershire", response.Registrant.Address[2]);
            Assert.AreEqual("LE9 4FS", response.Registrant.Address[3]);
            Assert.AreEqual("United Kingdom", response.Registrant.Address[4]);


            // Nameservers
            Assert.AreEqual(3, response.NameServers.Count);
            Assert.AreEqual("ns1.thenameservers.co.uk", response.NameServers[0]);
            Assert.AreEqual("ns2.thenameservers.co.uk", response.NameServers[1]);
            Assert.AreEqual("ns3.thenameservers.co.uk", response.NameServers[2]);

            // Domain Status
            Assert.AreEqual(1, response.DomainStatus.Count);
            Assert.AreEqual("No longer required", response.DomainStatus[0]);

            Assert.AreEqual(17, response.FieldsParsed);
        }
Exemplo n.º 28
0
        public void Test_found()
        {
            var sample   = SampleReader.Read("whois.verisign-grs.com", "net", "found.txt");
            var response = parser.Parse("whois.verisign-grs.com", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("generic/tld/Found02", response.TemplateName);

            Assert.AreEqual("google.net", response.DomainName.ToString());
            Assert.AreEqual("4802712_DOMAIN_NET-VRSN", 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("whois.markmonitor.com", response.Registrar.WhoisServer.Value);
            Assert.AreEqual("*****@*****.**", response.Registrar.AbuseEmail);
            Assert.AreEqual("+1.2083895740", response.Registrar.AbuseTelephoneNumber);

            Assert.AreEqual(new DateTime(2017, 02, 11, 10, 56, 37, 000, DateTimeKind.Utc), response.Updated);
            Assert.AreEqual(new DateTime(1999, 03, 15, 05, 00, 00, 000, DateTimeKind.Utc), response.Registered);
            Assert.AreEqual(new DateTime(2018, 03, 15, 04, 00, 00, 000, DateTimeKind.Utc), response.Expiration);

            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            // Domain Status
            Assert.AreEqual(6, response.DomainStatus.Count);
            Assert.AreEqual("clientDeleteProhibited", response.DomainStatus[0]);
            Assert.AreEqual("clientTransferProhibited", response.DomainStatus[1]);
            Assert.AreEqual("clientUpdateProhibited", response.DomainStatus[2]);
            Assert.AreEqual("serverDeleteProhibited", response.DomainStatus[3]);
            Assert.AreEqual("serverTransferProhibited", response.DomainStatus[4]);
            Assert.AreEqual("serverUpdateProhibited", response.DomainStatus[5]);

            Assert.AreEqual("unsigned", response.DnsSecStatus);
            Assert.AreEqual(23, response.FieldsParsed);
        }
Exemplo n.º 29
0
        public void Test_found_status_registered()
        {
            var sample   = SampleReader.Read("whois.nic.ch", "ch", "found_status_registered.txt");
            var response = parser.Parse("whois.nic.ch", sample);

            Assert.Greater(sample.Length, 0);
            Assert.AreEqual(WhoisStatus.Found, response.Status);

            Assert.AreEqual(0, response.ParsingErrors);
            Assert.AreEqual("whois.nic.ch/ch/Found", response.TemplateName);

            Assert.AreEqual("google.ch", response.DomainName.ToString());

            // Registrant Details
            Assert.AreEqual("Google Inc.", response.Registrant.Name);

            // Registrant Address
            Assert.AreEqual(4, response.Registrant.Address.Count);
            Assert.AreEqual("Administrator Domain", response.Registrant.Address[0]);
            Assert.AreEqual("Amphitheatre Parkway 1600", response.Registrant.Address[1]);
            Assert.AreEqual("US-94043 Mountain View, CA", response.Registrant.Address[2]);
            Assert.AreEqual("United States", response.Registrant.Address[3]);


            // TechnicalContact Details
            Assert.AreEqual("Google Inc.", response.TechnicalContact.Name);

            // TechnicalContact Address
            Assert.AreEqual(4, response.TechnicalContact.Address.Count);
            Assert.AreEqual("DNS Admin", response.TechnicalContact.Address[0]);
            Assert.AreEqual("2400 E. Bayshore Pkwy", response.TechnicalContact.Address[1]);
            Assert.AreEqual("US-94043 Mountain View", response.TechnicalContact.Address[2]);
            Assert.AreEqual("United States", response.TechnicalContact.Address[3]);


            // Nameservers
            Assert.AreEqual(4, response.NameServers.Count);
            Assert.AreEqual("ns1.google.com", response.NameServers[0]);
            Assert.AreEqual("ns2.google.com", response.NameServers[1]);
            Assert.AreEqual("ns3.google.com", response.NameServers[2]);
            Assert.AreEqual("ns4.google.com", response.NameServers[3]);

            Assert.AreEqual("N", response.DnsSecStatus);
            Assert.AreEqual(17, response.FieldsParsed);
        }
Exemplo n.º 30
0
        public void Test_found_025bbs_cn()
        {
            var sample = SampleReader.Read("whois.cnnic.cn", "cn", "025bbs.cn.txt");

            var record = parser.Parse("whois.cnnic.cn", sample);

            Assert.AreEqual("20180313s10001s99456578-cn", record.RegistryDomainId);
            Assert.AreEqual("阿里云计算有限公司(万网)", record.Registrar.Name);
            Assert.AreEqual(new DateTime(2018, 3, 13, 21, 45, 16), record.Registered.Value.ToUniversalTime());
            Assert.AreEqual(new DateTime(2021, 3, 13, 21, 45, 16), record.Expiration.Value.ToUniversalTime());
            Assert.AreEqual("南京越之彬网络科技有限公司", record.Registrant.Name);
            Assert.AreEqual("hc1250473063700", record.Registrant.RegistryId);
            Assert.AreEqual("*****@*****.**", record.Registrant.Email);

            Assert.AreEqual(2, record.NameServers.Count);
            Assert.AreEqual("dns27.hichina.com", record.NameServers[0]);
            Assert.AreEqual("dns28.hichina.com", record.NameServers[1]);
        }