use of org.onap.sdc.api.notification.IStatusData in project so by onap.
the class ASDCStatusCallBackTest method activateCallbackExceptionTest.
@Test
public void activateCallbackExceptionTest() throws Exception {
IStatusData statusData = mock(IStatusData.class);
doReturn("distributionId").when(statusData).getDistributionID();
doReturn("componentName").when(statusData).getComponentName();
doReturn(DistributionStatusEnum.COMPONENT_DONE_OK).when(statusData).getStatus();
doThrow(ArtifactInstallerException.class).when(toscaInstaller).installTheComponentStatus(isA(IStatusData.class));
statusCallback.activateCallback(statusData);
}
use of org.onap.sdc.api.notification.IStatusData in project so by onap.
the class ASDCStatusCallBackTest method activateCallbackDoneErrorStatusTest.
@Test
public void activateCallbackDoneErrorStatusTest() throws Exception {
IStatusData statusData = mock(IStatusData.class);
doReturn("distributionId").when(statusData).getDistributionID();
doReturn("componentName").when(statusData).getComponentName();
doReturn(DistributionStatusEnum.COMPONENT_DONE_ERROR).when(statusData).getStatus();
doNothing().when(toscaInstaller).installTheComponentStatus(isA(IStatusData.class));
statusCallback.activateCallback(statusData);
verify(toscaInstaller, times(1)).installTheComponentStatus(statusData);
}
Aggregations