Commit 93f23416 authored by Christian Wulf's avatar Christian Wulf

added StageTesterTest for producers

parent 22434f2e
package teetime.framework.test;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static teetime.framework.test.StageTester.*;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import teetime.stage.InitialElementProducer;
public class StageTesterTest {
@Test
public void testProducer() throws Exception {
InitialElementProducer<Integer> producer = new InitialElementProducer<>(1, 2, 3);
List<Integer> outputElements = new ArrayList<>();
test(producer)
// .send(4,5,6).to(port)
.receive(outputElements).from(producer.getOutputPort())
.start();
assertThat(outputElements, contains(1, 2, 3));
}
@Test
public void testConsumer() throws Exception {
}
@Test
public void testSink() throws Exception {
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment