Skip to content

Commit 70a3f91

Browse files
committed
Fix test
1 parent 1c62f2d commit 70a3f91

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

test/java/IP2ProxyTest.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ class IP2ProxyTest {
1616
private static ProxyResult All;
1717
private static String binfile = "IP2PROXY-LITE-PX1.BIN";
1818
private static String binfilepath;
19+
private static byte[] binFileBytes;
1920
private static String ip = "8.8.8.8";
2021

2122
@BeforeAll
22-
static void Setup() {
23+
static void Setup() throws IOException {
2324
Path binpath = Paths.get("src", "test", "resources", binfile);
2425
binfilepath = binpath.toFile().getAbsolutePath();
2526
binFileBytes = Files.readAllBytes(binpath);
@@ -35,14 +36,11 @@ void TestOpenException() {
3536
assertThrows(IOException.class, () -> {
3637
Proxy.Open("dummy.bin");
3738
});
38-
}
39-
40-
assertThrows(NullPointerException .class, () ->
4139

42-
{
43-
loc.Open((byte[]) null);
44-
});
45-
}
40+
assertThrows(NullPointerException.class, () -> {
41+
Proxy.Open((byte[])null);
42+
});
43+
}
4644

4745
@Test
4846
void TestQueryIsProxy() throws IOException {

0 commit comments

Comments
 (0)