use of org.onap.so.asdc.client.DistributionStatusMessage in project so by onap.
the class DistributionClientEmulatorTest method sendDeploymentStatusPrimary.
@Test
public void sendDeploymentStatusPrimary() {
IDistributionStatusMessage message = new DistributionStatusMessage("testArtifactUrl", "testConsumerId", "testDistributionId", DistributionStatusEnum.DOWNLOAD_OK, 123456);
IDistributionClientResult result = distClientEmulator.sendDeploymentStatus(message);
IDistributionClientResult expectedResult = new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name());
assertEquals(message, distClientEmulator.getDistributionMessageReceived().get(0));
assertEquals(expectedResult.getDistributionActionResult(), result.getDistributionActionResult());
assertEquals(expectedResult.getDistributionMessageResult(), result.getDistributionMessageResult());
}
use of org.onap.so.asdc.client.DistributionStatusMessage in project so by onap.
the class DistributionClientEmulatorTest method sendDeploymentStatusSecondary.
@Test
public void sendDeploymentStatusSecondary() {
IDistributionStatusMessage message = new DistributionStatusMessage("testArtifactUrl", "testConsumerId", "testDistributionId", DistributionStatusEnum.DOWNLOAD_OK, 123456);
IDistributionClientResult result = distClientEmulator.sendDeploymentStatus(message, "test");
IDistributionClientResult expectedResult = new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name());
assertEquals(message, distClientEmulator.getDistributionMessageReceived().get(0));
assertEquals(expectedResult.getDistributionActionResult(), result.getDistributionActionResult());
assertEquals(expectedResult.getDistributionMessageResult(), result.getDistributionMessageResult());
}
use of org.onap.so.asdc.client.DistributionStatusMessage in project so by onap.
the class DistributionClientEmulatorTest method sendDownloadStatusPrimary.
@Test
public void sendDownloadStatusPrimary() {
IDistributionStatusMessage message = new DistributionStatusMessage("testArtifactUrl", "testConsumerId", "testDistributionId", DistributionStatusEnum.DOWNLOAD_OK, 123456);
IDistributionClientResult result = distClientEmulator.sendDownloadStatus(message);
IDistributionClientResult expectedResult = new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name());
assertEquals(message, distClientEmulator.getDistributionMessageReceived().get(0));
assertEquals(expectedResult.getDistributionActionResult(), result.getDistributionActionResult());
assertEquals(expectedResult.getDistributionMessageResult(), result.getDistributionMessageResult());
}
use of org.onap.so.asdc.client.DistributionStatusMessage in project so by onap.
the class DistributionClientEmulatorTest method sendDownloadStatusSecondary.
@Test
public void sendDownloadStatusSecondary() {
IDistributionStatusMessage message = new DistributionStatusMessage("testArtifactUrl", "testConsumerId", "testDistributionId", DistributionStatusEnum.DOWNLOAD_OK, 123456);
IDistributionClientResult result = distClientEmulator.sendDownloadStatus(message, "test");
IDistributionClientResult expectedResult = new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name());
assertEquals(message, distClientEmulator.getDistributionMessageReceived().get(0));
assertEquals(expectedResult.getDistributionActionResult(), result.getDistributionActionResult());
assertEquals(expectedResult.getDistributionMessageResult(), result.getDistributionMessageResult());
}
use of org.onap.so.asdc.client.DistributionStatusMessage in project so by onap.
the class DistributionClientEmulatorTest method getDistributionMessageReceived.
@Test
public void getDistributionMessageReceived() {
List<IDistributionStatusMessage> receivedMessages = distClientEmulator.getDistributionMessageReceived();
assertEquals(new LinkedList<>(), receivedMessages);
IDistributionStatusMessage message = new DistributionStatusMessage("testArtifactUrl", "testConsumerId", "testDistributionId", DistributionStatusEnum.DOWNLOAD_OK, 123456);
distClientEmulator.sendDeploymentStatus(message);
assertEquals(message, receivedMessages.get(0));
IDistributionStatusMessage message2 = new DistributionStatusMessage("testArtifactUrl2", "testConsumerId2", "testDistributionId2", DistributionStatusEnum.DOWNLOAD_OK, 1234567);
distClientEmulator.sendDeploymentStatus(message2);
assertEquals(message2, receivedMessages.get(1));
}
Aggregations