Changes for mentioning db path... (#857)

This commit is contained in:
Parth Joshi
2016-11-23 09:41:02 +05:30
committed by KevinGilmore
parent b5c733df47
commit 1ba76d72f0
3 changed files with 5 additions and 5 deletions

View File

@@ -15,10 +15,10 @@ public class GeoIpIntegrationTest {
@Test
public void givenIP_whenFetchingCity_thenReturnsCityData() throws IOException, GeoIp2Exception {
File database = new File("C:\\Users\\Parth Joshi\\Desktop\\GeoLite2-City.mmdb\\GeoLite2-City.mmdb");
File database = new File("your-path-to-db-file");
DatabaseReader dbReader = new DatabaseReader.Builder(database).build();
InetAddress ipAddress = InetAddress.getByName("202.47.112.9");
InetAddress ipAddress = InetAddress.getByName("your-public-ip");
CityResponse response = dbReader.city(ipAddress);
String countryName = response.getCountry().getName();