File tree Expand file tree Collapse file tree 6 files changed +31
-17
lines changed
Expand file tree Collapse file tree 6 files changed +31
-17
lines changed Original file line number Diff line number Diff line change 1+ .idea /
2+ target /
3+ .vim /
Original file line number Diff line number Diff line change 11sudo : false
22language : java
3-
3+ dist : trusty
44jdk :
55 - oraclejdk8
66
@@ -18,5 +18,3 @@ branches:
1818cache :
1919 directories :
2020 - $HOME/.m2
21-
22-
Original file line number Diff line number Diff line change 7575 <version >5.2.0</version >
7676 <scope >test</scope >
7777 </dependency >
78+ <dependency >
79+ <groupId >org.junit.jupiter</groupId >
80+ <artifactId >junit-jupiter-engine</artifactId >
81+ <version >5.2.0</version >
82+ <scope >test</scope >
83+ </dependency >
7884 </dependencies >
7985
8086 <build >
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Regenerate ctags.
4+
5+ ctags \
6+ --recurse=yes \
7+ --exclude=node_modules \
8+ --exclude=dist \
9+ --exclude=build \
10+ --exclude=target \
11+ -f .vim/tags \
12+ --tag-relative=never \
13+ --totals=yes \
14+ ./src
Original file line number Diff line number Diff line change @@ -42,9 +42,7 @@ public IPInfoBuilder setCache(Cache cache) {
4242 }
4343
4444 public IPInfo build () {
45- Type type = new TypeToken <Map <String , String >>() {
46- }.getType ();
47-
45+ Type type = new TypeToken <Map <String , String >>(){}.getType ();
4846 Gson gson = new Gson ();
4947 Map <String , String > map ;
5048
Original file line number Diff line number Diff line change 99
1010import static org .junit .jupiter .api .Assertions .*;
1111
12- public class IPInfoTests {
12+ public class IPInfoTest {
1313 private IPInfo ipInfo ;
1414
15- @ BeforeEach
16- void initAll () {
17- ipInfo = IPInfo .builder ().build ();
18- }
19-
2015 @ Test
21- void testGoogleDNS () {
16+ public void testGoogleDNS () {
17+ ipInfo = IPInfo .builder ().build ();
2218 try {
2319 IPResponse response = ipInfo .lookupIP ("8.8.8.8" );
24-
2520 assertAll ("Country Code" ,
2621 () -> assertEquals (response .getCountryCode (), "US" ),
2722 () -> assertEquals (response .getCountryName (), "United States" ),
28- () -> assertEquals (response .getHostname (), "google-public- dns-a .google.com " ),
23+ () -> assertEquals (response .getHostname (), "dns.google" ),
2924 () -> assertEquals (response .getIp (), "8.8.8.8" )
3025 );
31-
3226 } catch (RateLimitedException e ) {
3327 fail (e );
3428 }
3529 }
3630
3731 @ Test
38- void testASNWithoutAuth () {
32+ public void testASNWithoutAuth () {
33+ ipInfo = IPInfo .builder ().build ();
3934 assertThrows (ErrorResponseException .class , () -> ipInfo .lookupASN ("AS7922" ));
4035 }
4136}
You can’t perform that action at this time.
0 commit comments