Search in sources :

Example 1 with AllottedResource

use of org.onap.so.bpmn.core.domain.AllottedResource in project so by onap.

the class DecomposeJsonUtilTest method testJsonToAllottedResource_JsonDecomposingException.

@Test
public void testJsonToAllottedResource_JsonDecomposingException() throws JsonDecomposingException {
    expectedException.expect(JsonDecomposingException.class);
    // wrong object
    configResource = createConfigResourceData();
    AllottedResource allottedResourceObj = DecomposeJsonUtil.jsonToAllottedResource(configResource.toString());
}
Also used : AllottedResource(org.onap.so.bpmn.core.domain.AllottedResource) Test(org.junit.Test)

Example 2 with AllottedResource

use of org.onap.so.bpmn.core.domain.AllottedResource in project so by onap.

the class DecomposeJsonUtilTest method testJsonToAllottedResource.

@Test
public void testJsonToAllottedResource() throws JsonDecomposingException {
    allottedResource = createAllottedResourceData();
    AllottedResource allottedResourceObj = DecomposeJsonUtil.jsonToAllottedResource(allottedResource.toString());
    assertEquals(allottedResource.getResourceId(), allottedResourceObj.getResourceId());
}
Also used : AllottedResource(org.onap.so.bpmn.core.domain.AllottedResource) Test(org.junit.Test)

Example 3 with AllottedResource

use of org.onap.so.bpmn.core.domain.AllottedResource in project so by onap.

the class DecomposeJsonUtilTest method createAllottedResourceData.

private AllottedResource createAllottedResourceData() {
    allottedResource = new AllottedResource();
    allottedResource.setResourceId("resourceId");
    allottedResource.setNfFunction("nfFunction");
    allottedResource.setNfNamingCode("nfNamingCode");
    allottedResource.setNfRole("nfRole");
    return allottedResource;
}
Also used : AllottedResource(org.onap.so.bpmn.core.domain.AllottedResource)

Aggregations

AllottedResource (org.onap.so.bpmn.core.domain.AllottedResource)3 Test (org.junit.Test)2