public void Domain_ValidResponse() { using (var reader = new DatabaseReader(_domainDatabaseFile)) { var ipAddress = "1.2.0.0"; var response = reader.Domain(ipAddress); Assert.Equal("maxmind.com", response.Domain); Assert.Equal(ipAddress, response.IPAddress); } }
public void Domain() { using (var reader = new DatabaseReader(Path.Combine(_databaseDir, "GeoIP2-Domain-Test.mmdb"))) { var ipAddress = "1.2.0.0"; var response = reader.Domain(ipAddress); Assert.That(response.Domain, Is.EqualTo("maxmind.com")); Assert.That(response.IPAddress, Is.EqualTo(ipAddress)); } }