use of org.onap.so.asdc.client.test.emulators.JsonStatusData in project so by onap.
the class ASDCStatusCallBackTest method activateCallbackTest.
@Test
public void activateCallbackTest() throws Exception {
JsonStatusData statusData = new JsonStatusData();
doNothing().when(toscaInstaller).installTheComponentStatus(isA(JsonStatusData.class));
statusCallback.activateCallback(statusData);
verify(toscaInstaller, times(1)).installTheComponentStatus(statusData);
}
use of org.onap.so.asdc.client.test.emulators.JsonStatusData in project so by onap.
the class ASDCRestInterface method invokeASDCStatusData.
@POST
@Path("/statusData/v1")
@Produces(MediaType.APPLICATION_JSON)
@Transactional
public Response invokeASDCStatusData(final String request) {
try {
final DistributionClientEmulator distributionClientEmulator = getDistributionClientEmulator("resource-examples/");
final JsonStatusData statusData = JsonStatusData.instantiateNotifFromJsonFile("resource-examples/");
asdcController.setDistributionClient(distributionClientEmulator);
asdcController.initASDC();
toscaInstaller.installTheComponentStatus(statusData);
asdcController.closeASDC();
logger.info(LoggingAnchor.FOUR, MessageEnum.ASDC_ARTIFACT_DEPLOY_SUC.toString(), statusData.getDistributionID(), "ASDC", "ASDC Updates Are Complete");
} catch (final Exception e) {
logger.info("Error caught " + e.getMessage());
logger.error(LoggingAnchor.SIX, MessageEnum.ASDC_GENERAL_EXCEPTION.toString(), "Exception caught during ASDCRestInterface", "ASDC", "invokeASDCService", ErrorCode.BusinessProcessError.getValue(), "Exception in invokeASDCService", e);
}
return null;
}
use of org.onap.so.asdc.client.test.emulators.JsonStatusData in project so by onap.
the class ToscaResourceInstallerTest method before.
@Before
public void before() {
MockitoAnnotations.initMocks(this);
notificationData = new NotificationDataImpl();
statusData = new JsonStatusData();
}
Aggregations