use of org.iobserve.service.privacy.violation.filter.ProbeMapper in project iobserve-analysis by research-iobserve.
the class ProbeMapperTest method receiveEmptyDataTest.
@Test
public void receiveEmptyDataTest() {
this.probeMapper = new ProbeMapper(Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class));
final ProbeManagementData data = new ProbeManagementData(new HashMap<AllocationContext, Set<OperationSignature>>(), new HashMap<AllocationContext, Set<OperationSignature>>());
final List<ProbeManagementData> input = new LinkedList<>();
input.add(data);
final List<AbstractTcpControlEvent> output = new LinkedList<>();
StageTester.test(this.probeMapper).and().send(input).to(this.probeMapper.getInputPort()).receive(output).from(this.probeMapper.getOutputPort()).start();
Assert.assertTrue(output.isEmpty());
}
use of org.iobserve.service.privacy.violation.filter.ProbeMapper in project iobserve-analysis by research-iobserve.
the class ProbeMapperTest method receiveUninitializedDataTest.
// private final int port = 5791;
@Test
public void receiveUninitializedDataTest() {
this.probeMapper = new ProbeMapper(Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class), Mockito.mock(Neo4JModelResource.class));
final ProbeManagementData data = new ProbeManagementData(null, null);
final List<ProbeManagementData> input = new LinkedList<>();
input.add(data);
final List<AbstractTcpControlEvent> output = new LinkedList<>();
StageTester.test(this.probeMapper).and().send(input).to(this.probeMapper.getInputPort()).receive(output).from(this.probeMapper.getOutputPort()).start();
Assert.assertTrue(output.isEmpty());
}
Aggregations