Updating test

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/gcat@177315 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2019-02-27 10:26:13 +00:00
parent 36f0361a6f
commit e82f9f2490
1 changed files with 16 additions and 5 deletions

View File

@ -27,7 +27,7 @@ public class CKANPackageTest extends ContextTest {
private static final String ITEM_NAME_VALUE = "restful_transaction_model";
private static final String LICENSE_VALUE = "CC-BY-SA-4.0";
private static final String EXTRAS_TYPE_VALUE_VALUE = "EmptyProfile";
private static final String EXTRAS_TYPE_VALUE_VALUE = "FSKXModel";
@Test
@ -103,10 +103,20 @@ public class CKANPackageTest extends ContextTest {
resourceArrayNode.add(resourceNode);
ArrayNode extraArrayNode = itemObjectNode.putArray(CKANPackage.EXTRAS_KEY);
ObjectNode extraNode = mapper.createObjectNode();
extraNode.put(CKANPackage.EXTRAS_KEY_KEY, CKANPackage.EXTRAS_KEY_VALUE_SYSTEM_TYPE);
extraNode.put(CKANPackage.EXTRAS_VALUE_KEY, EXTRAS_TYPE_VALUE_VALUE);
extraArrayNode.add(extraNode);
ObjectNode typeNode = mapper.createObjectNode();
typeNode.put(CKANPackage.EXTRAS_KEY_KEY, CKANPackage.EXTRAS_KEY_VALUE_SYSTEM_TYPE);
typeNode.put(CKANPackage.EXTRAS_VALUE_KEY, EXTRAS_TYPE_VALUE_VALUE);
extraArrayNode.add(typeNode);
ObjectNode modelNode = mapper.createObjectNode();
modelNode.put(CKANPackage.EXTRAS_KEY_KEY, "Model Language");
modelNode.put(CKANPackage.EXTRAS_VALUE_KEY, "Other");
extraArrayNode.add(modelNode);
ObjectNode populationNode = mapper.createObjectNode();
populationNode.put(CKANPackage.EXTRAS_KEY_KEY, "Population");
populationNode.put(CKANPackage.EXTRAS_VALUE_KEY, "Italian");
extraArrayNode.add(populationNode);
CKANPackage ckanPackage = new CKANPackage();
ckanPackage.setName(ITEM_NAME_VALUE);
@ -119,6 +129,7 @@ public class CKANPackageTest extends ContextTest {
@Test
public void create() throws Exception {
ObjectMapper mapper = new ObjectMapper();
createPackage(mapper);
}