Search in sources :

Example 1 with DeployPCMMapper

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());
}
Also used : PCMDeployedEvent(org.iobserve.analysis.deployment.data.PCMDeployedEvent) ArrayList(java.util.ArrayList) DeployPCMMapper(org.iobserve.analysis.deployment.DeployPCMMapper) Test(org.junit.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

ArrayList (java.util.ArrayList)1 DeployPCMMapper (org.iobserve.analysis.deployment.DeployPCMMapper)1 PCMDeployedEvent (org.iobserve.analysis.deployment.data.PCMDeployedEvent)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1