Package org.springframework.xd.test.fixtures

Examples of org.springframework.xd.test.fixtures.CounterSink


public class ProcessorsTests extends AbstractStreamIntegrationTest {

  @Test
  public void splitterDoesNotSplitByDefault() throws Exception {
    HttpSource httpSource = newHttpSource();
    CounterSink counterSink = metrics().newCounterSink();

    stream().create(generateStreamName(), "%s | splitter | %s", httpSource, counterSink);

    httpSource.ensureReady().postData("Hello World !");
    assertThat(counterSink, eventually(hasValue("1")));
View Full Code Here


  }

  @Test
  public void splitterDoesSplit() {
    HttpSource httpSource = newHttpSource();
    CounterSink counterSink = metrics().newCounterSink();

    stream().create(generateStreamName(), "%s | splitter --expression=payload.split(' ') | %s",
        httpSource, counterSink);

    httpSource.ensureReady().postData("Hello World !");
View Full Code Here

    String streamName1 = generateStreamName();
    String streamName2 = generateStreamName();
    String queueName = generateQueueName();
    logger.info("Creating stream with named channel '" + queueName + "' as source");
    HttpSource httpSource = newHttpSource();
    CounterSink counterSink = metrics().newCounterSink();

    stream().create(streamName1, "%s | transform --expression=payload.toUpperCase() > %s",
        httpSource, queueName);
    // Create stream with named channel as source
    stream().create(streamName2, "%s > %s", queueName, counterSink);
View Full Code Here

TOP

Related Classes of org.springframework.xd.test.fixtures.CounterSink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.