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); }
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); }