Пример #1
0
        public void TestDownloadWhoisResults()
        {
            var record = new WhoisRecord {
                Domain = "flipbit.co.uk", Server = new WhoisServer("uk", "whois.com")
            };

            factory.Reader = new FakeTcpReader("WHOIS Data");

            visitor.Visit(record);

            Assert.AreEqual("WHOIS Data", record.Text);
        }
Пример #2
0
        public void TestDownloadWhoisResults()
        {
            TcpReaderFactory.Bind(() => new FakeTcpReader("WHOIS Data"));

            var server = new WhoisServer("uk", "whois.com");

            var lookup = new LookupState
            {
                WhoisServer = server,
                Domain      = "flipbit.co.uk",
                Options     = WhoisOptions.Defaults
            };

            visitor.Visit(lookup);

            Assert.AreEqual("WHOIS Data", lookup.Response.Content);
        }