Search in sources :

Example 1 with MarcJson

use of org.folio.rest.jaxrs.model.MarcJson in project mod-inventory-storage by folio-org.

the class InstanceStorageTest method toMarcJson.

private MarcJson toMarcJson(String resourcePath) throws IOException {
    String mrcjson = IOUtils.toString(this.getClass().getResourceAsStream(resourcePath), "UTF-8");
    JsonObject json = new JsonObject(mrcjson);
    MarcJson newMarcJson = new MarcJson();
    newMarcJson.setLeader(json.getString("leader"));
    newMarcJson.setFields(json.getJsonArray("fields").getList());
    return newMarcJson;
}
Also used : MarcJson(org.folio.rest.jaxrs.model.MarcJson) JsonObject(io.vertx.core.json.JsonObject) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString)

Aggregations

JsonObject (io.vertx.core.json.JsonObject)1 MarcJson (org.folio.rest.jaxrs.model.MarcJson)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1