Skip to content

Commit 5ff9f9d

Browse files
committed
Add test for Satellite connection_type
1 parent 4166887 commit 5ff9f9d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/test/java/com/maxmind/geoip2/model/InsightsResponseTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.github.tomakehurst.wiremock.junit.WireMockRule;
44
import com.maxmind.geoip2.WebServiceClient;
55
import com.maxmind.geoip2.exception.GeoIp2Exception;
6+
import com.maxmind.geoip2.model.ConnectionTypeResponse.ConnectionType;
67
import com.maxmind.geoip2.record.*;
78
import org.junit.Before;
89
import org.junit.Rule;
@@ -87,6 +88,9 @@ public void testTraits() {
8788
assertEquals(
8889
"traits.getAutonomousSystemOrganization() does not return example.com",
8990
"example.com", traits.getDomain());
91+
assertEquals(
92+
"traits.getConnectionType() does not return satellite",
93+
ConnectionType.SATELLITE, traits.getConnectionType());
9094
assertEquals("traits.getIpAddress() does not return 1.2.3.4",
9195
"1.2.3.4", traits.getIpAddress());
9296
assertTrue("traits.isAnonymous() returns true", traits.isAnonymous());

src/test/resources/test-data/insights0.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"traits": {
7070
"autonomous_system_number": 1234,
7171
"autonomous_system_organization": "AS Organization",
72+
"connection_type": "Satellite",
7273
"domain": "example.com",
7374
"ip_address": "1.2.3.4",
7475
"isp": "Comcast",
@@ -85,4 +86,4 @@
8586
"user_count": 2,
8687
"user_type": "college"
8788
}
88-
}
89+
}

src/test/resources/test-data/insights1.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"traits": {
8686
"autonomous_system_number": 1234,
8787
"autonomous_system_organization": "AS Organization",
88+
"connection_type": "Satellite",
8889
"domain": "example.com",
8990
"ip_address": "1.2.3.4",
9091
"isp": "Comcast",
@@ -100,4 +101,4 @@
100101
"user_count": 2,
101102
"user_type": "college"
102103
}
103-
}
104+
}

0 commit comments

Comments
 (0)