use of org.onap.sdc.api.results.IDistributionClientResult 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.sdc.api.results.IDistributionClientResult in project so by onap.
the class DistributionClientEmulatorTest method start.
@Test
public void start() {
IDistributionClientResult result = distClientEmulator.start();
IDistributionClientResult expectedResult = new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name());
assertEquals(expectedResult.getDistributionActionResult(), result.getDistributionActionResult());
assertEquals(expectedResult.getDistributionMessageResult(), result.getDistributionMessageResult());
}
use of org.onap.sdc.api.results.IDistributionClientResult in project so by onap.
the class DistributionClientEmulatorTest method initPrimary.
@Test
public void initPrimary() {
IDistributionClientResult result = distClientEmulator.init(new ASDCConfiguration(), new ASDCNotificationCallBack());
IDistributionClientResult expectedResult = new DistributionClientResultImpl(DistributionActionResultEnum.SUCCESS, DistributionActionResultEnum.SUCCESS.name());
assertEquals(expectedResult.getDistributionActionResult(), result.getDistributionActionResult());
assertEquals(expectedResult.getDistributionMessageResult(), result.getDistributionMessageResult());
}
use of org.onap.sdc.api.results.IDistributionClientResult 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.sdc.api.results.IDistributionClientResult 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());
}
Aggregations