mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-05 12:25:36 -04:00
Merge pull request #47 from stleary/add-to-test-suite-and-fix-resource
add JSONPointerTest to test suite, fix resource for gradle build
This commit is contained in:
commit
7038ea884e
@ -14,6 +14,9 @@ sourceSets {
|
|||||||
java {
|
java {
|
||||||
srcDir 'src/test'
|
srcDir 'src/test'
|
||||||
}
|
}
|
||||||
|
resources {
|
||||||
|
srcDir 'resources'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,10 +4,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
import static org.junit.Assert.assertSame;
|
import static org.junit.Assert.assertSame;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.*;
|
||||||
import org.json.JSONPointer;
|
|
||||||
import org.json.JSONPointerException;
|
|
||||||
import org.json.JSONTokener;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class JSONPointerTest {
|
public class JSONPointerTest {
|
||||||
@ -16,7 +13,7 @@ public class JSONPointerTest {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
document = new JSONObject(new JSONTokener(
|
document = new JSONObject(new JSONTokener(
|
||||||
JSONPointerTest.class.getResourceAsStream("/org/json/junit/jsonpointer-testdoc.json")));
|
JSONPointerTest.class.getClassLoader().getResourceAsStream("jsonpointer-testdoc.json")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object query(String pointer) {
|
private Object query(String pointer) {
|
||||||
|
@ -14,7 +14,8 @@ import org.junit.runners.Suite;
|
|||||||
JSONStringerTest.class,
|
JSONStringerTest.class,
|
||||||
JSONObjectTest.class,
|
JSONObjectTest.class,
|
||||||
JSONArrayTest.class,
|
JSONArrayTest.class,
|
||||||
EnumTest.class
|
EnumTest.class,
|
||||||
|
JSONPointerTest.class
|
||||||
})
|
})
|
||||||
public class JunitTestSuite {
|
public class JunitTestSuite {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user