use of org.iobserve.analysis.deployment.DeployPCMMapper in project iobserve-analysis by research-iobserve.
the class DeployPCMMapperTest method testExecuteIDeployed.
/**
* Test method for
* {@link org.iobserve.analysis.deployment.DeployPCMMapper#execute(org.iobserve.common.record.IDeployed)}.
*/
@Test
public void testExecuteIDeployed() {
final DeployPCMMapper mapper = new DeployPCMMapper(DeployPCMMapperTest.mockedCorrespondence);
final List<PCMDeployedEvent> deploymentEvents = new ArrayList<>();
StageTester.test(mapper).and().send(DeployPCMMapperTest.inputEvents).to(mapper.getInputPort()).and().receive(deploymentEvents).from(mapper.getOutputPort()).start();
Assert.assertEquals("Number of events differ.", deploymentEvents.size(), DeployPCMMapperTest.pcmDeployedEvents.size());
Assert.assertEquals("Different events.", deploymentEvents.get(0).getService(), ModelLevelData.PCM_DEPLOYED_EVENT.getService());
}
Aggregations