[VIVO-1320] Convert some org.json usages to Jackson
This commit is contained in:
parent
916640ef43
commit
bf450aca21
6 changed files with 195 additions and 178 deletions
|
@ -10,8 +10,7 @@ import java.util.regex.PatternSyntaxException;
|
|||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
@ -53,14 +52,12 @@ public class JSONReconcileServletTest extends AbstractTestClass {
|
|||
String defaultTypeList = null;
|
||||
String serverName = null;
|
||||
String schemaSpaceOutput = null;
|
||||
JSONObject jsonResult = null;
|
||||
ObjectNode jsonResult = null;
|
||||
try {
|
||||
jsonResult = reconcile.getMetadata(request, response, defaultNamespace, defaultTypeList, serverName, serverPort);
|
||||
schemaSpaceOutput = jsonResult.getString("schemaSpace");
|
||||
schemaSpaceOutput = jsonResult.get("schemaSpace").asText();
|
||||
} catch (ServletException e) {
|
||||
System.err.println("JSONReconcileServletTest getMetadata ServletException: " + e);
|
||||
} catch (JSONException e) {
|
||||
System.err.println("JSONReconcileServletTest getMetadata JSONException: " + e);
|
||||
}
|
||||
Assert.assertNotNull("output should not be null", jsonResult);
|
||||
Assert.assertEquals("schemaSpaceOutput", defaultNamespace, schemaSpaceOutput);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue