use of org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf in project so by onap.
the class AAIUpdateTasksTest method updateOrchestrationStatusInventoriedPnfTest.
@Test
public void updateOrchestrationStatusInventoriedPnfTest() throws Exception {
Pnf pnf = preparePnfAndExtractForPnf();
doNothing().when(aaiPnfResources).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.INVENTORIED);
aaiUpdateTasks.updateOrchestrationStatusInventoriedPnf(execution);
verify(aaiPnfResources, times(1)).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.INVENTORIED);
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf in project so by onap.
the class AAIUpdateTasksTest method updateOrchestrationStatusActivePnfExceptionTest.
@Test
public void updateOrchestrationStatusActivePnfExceptionTest() throws Exception {
Pnf pnf = preparePnfAndExtractForPnf();
doThrow(RuntimeException.class).when(aaiPnfResources).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.ACTIVE);
expectedException.expect(BpmnError.class);
aaiUpdateTasks.updateOrchestrationStatusActivePnf(execution);
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf in project so by onap.
the class AAIUpdateTasksTest method updateOrchestrationStatusActivePnfTest.
@Test
public void updateOrchestrationStatusActivePnfTest() throws Exception {
Pnf pnf = preparePnfAndExtractForPnf();
doNothing().when(aaiPnfResources).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.ACTIVE);
aaiUpdateTasks.updateOrchestrationStatusActivePnf(execution);
verify(aaiPnfResources, times(1)).updateOrchestrationStatusPnf(pnf, OrchestrationStatus.ACTIVE);
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf in project so by onap.
the class AAIUpdateTasksTest method preparePnfAndExtractForPnf.
private Pnf preparePnfAndExtractForPnf() throws BBObjectNotFoundException {
Pnf pnf = buildPnf();
when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.PNF))).thenReturn(pnf);
return pnf;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf in project so by onap.
the class TestDataSetup method buildPnf.
public Pnf buildPnf() {
pnfCounter++;
Pnf pnf = new Pnf();
pnf.setPnfId("testPnfId" + pnfCounter);
pnf.setPnfName("testPnfName" + pnfCounter);
return pnf;
}
Aggregations