Unify JSON testing in Wikidata extension
This commit is contained in:
parent
75b642f9bf
commit
0698b9c84e
@ -42,6 +42,7 @@ import com.google.refine.model.AbstractOperation;
|
||||
import com.google.refine.model.Project;
|
||||
import com.google.refine.operations.OperationRegistry;
|
||||
import com.google.refine.tests.RefineTest;
|
||||
import com.google.refine.tests.util.TestUtils;
|
||||
import com.google.refine.util.ParsingUtilities;
|
||||
import com.google.refine.util.Pool;
|
||||
|
||||
@ -78,7 +79,7 @@ public abstract class OperationTest extends RefineTest {
|
||||
AbstractOperation op = reconstruct();
|
||||
StringWriter writer = new StringWriter();
|
||||
ParsingUtilities.defaultWriter.writeValue(writer, op);
|
||||
JacksonSerializationTest.assertJsonEquals(json.toString(), writer.toString());
|
||||
TestUtils.assertEqualAsJson(json.toString(), writer.toString());
|
||||
}
|
||||
|
||||
protected LineNumberReader makeReader(String input) {
|
||||
|
@ -42,6 +42,7 @@ import org.apache.commons.io.FileUtils;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonRawValue;
|
||||
|
||||
@ -86,6 +87,7 @@ public class ImportingJob {
|
||||
return config.toString();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public JSONObject getOrCreateDefaultConfig() {
|
||||
return config;
|
||||
}
|
||||
@ -137,6 +139,7 @@ public class ImportingJob {
|
||||
}
|
||||
|
||||
|
||||
@JsonIgnore
|
||||
public JSONObject getRetrievalRecord() {
|
||||
synchronized(config) {
|
||||
return JSONUtilities.getObject(config,"retrievalRecord");
|
||||
@ -152,6 +155,7 @@ public class ImportingJob {
|
||||
return fileRecordObject.has("metaDataFormat");
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public List<JSONObject> getSelectedFileRecords() {
|
||||
List<JSONObject> results = new ArrayList<JSONObject>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user