Search in sources :

Example 1 with IErrorMessages

use of org.iobserve.stages.data.IErrorMessages in project iobserve-analysis by research-iobserve.

the class ProbeControlFilterTest method getValidControlEventTest.

/**
 * Check whether the control event is communicated properly.
 */
@Test
public void getValidControlEventTest() {
    // NOPMD localhost is required here
    final String ip = "127.0.0.1";
    final String hostname = "test.host";
    final AbstractTcpControlEvent controlEvent = new TcpActivationControlEvent(ip, ProbeControlFilterTest.port, hostname, ProbeControlFilterTest.PATTERN);
    final List<AbstractTcpControlEvent> input = new ArrayList<>();
    input.add(controlEvent);
    final List<IErrorMessages> output = new ArrayList<>();
    StageTester.test(this.probeControlFilter).and().send(input).to(this.probeControlFilter.getInputPort()).and().receive(output).from(this.probeControlFilter.getOutputPort()).start();
    Assert.assertTrue(output.size() == 0);
}
Also used : AbstractTcpControlEvent(org.iobserve.utility.tcp.events.AbstractTcpControlEvent) TcpActivationControlEvent(org.iobserve.utility.tcp.events.TcpActivationControlEvent) ArrayList(java.util.ArrayList) IErrorMessages(org.iobserve.stages.data.IErrorMessages) Test(org.junit.Test)

Example 2 with IErrorMessages

use of org.iobserve.stages.data.IErrorMessages in project iobserve-analysis by research-iobserve.

the class ProbeControlFilterTest method getValidControlEventTest.

/**
 * Check whether the control event is communicated properly.
 */
@Test
public void getValidControlEventTest() {
    // NOPMD localhost is required here
    final String ip = "127.0.0.1";
    final String hostname = "test.host";
    final AbstractTcpControlEvent controlEvent = new TcpActivationControlEvent(ip, ProbeControlFilterTest.port, hostname, ProbeControlFilterTest.PATTERN, ProbeControlFilterTest.TRIGGER_TIMESTAMP);
    final List<AbstractTcpControlEvent> input = new ArrayList<>();
    input.add(controlEvent);
    final List<IErrorMessages> output = new ArrayList<>();
    StageTester.test(this.probeControlFilter).and().send(input).to(this.probeControlFilter.getInputPort()).and().receive(output).from(this.probeControlFilter.getOutputPort()).start();
    Assert.assertTrue(output.isEmpty());
}
Also used : AbstractTcpControlEvent(org.iobserve.utility.tcp.events.AbstractTcpControlEvent) TcpActivationControlEvent(org.iobserve.utility.tcp.events.TcpActivationControlEvent) ArrayList(java.util.ArrayList) IErrorMessages(org.iobserve.stages.data.IErrorMessages) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)2 IErrorMessages (org.iobserve.stages.data.IErrorMessages)2 AbstractTcpControlEvent (org.iobserve.utility.tcp.events.AbstractTcpControlEvent)2 TcpActivationControlEvent (org.iobserve.utility.tcp.events.TcpActivationControlEvent)2 Test (org.junit.Test)2