Examples of receivePayload()


Examples of org.springframework.xd.dirt.test.process.SingleNodeProcessingChain.receivePayload()

    String processingChainUnderTest = "transform --expression='payload.toUpperCase()' | filter --expression='payload.length() > 4'";

    SingleNodeProcessingChain chain = chain(application, "eezypeasy", processingChainUnderTest);

    chain.sendPayload("hello");
    String result = (String) chain.receivePayload(RECEIVE_TIMEOUT);
    assertEquals("HELLO", result);

    chain.sendPayload("a");
    result = (String) chain.receivePayload(RECEIVE_TIMEOUT);
    assertNull(result);
View Full Code Here

Examples of org.springframework.xd.dirt.test.process.SingleNodeProcessingChain.receivePayload()

    chain.sendPayload("hello");
    String result = (String) chain.receivePayload(RECEIVE_TIMEOUT);
    assertEquals("HELLO", result);

    chain.sendPayload("a");
    result = (String) chain.receivePayload(RECEIVE_TIMEOUT);
    assertNull(result);

    chain.destroy();
  }
View Full Code Here

Examples of org.springframework.xd.dirt.test.process.SingleNodeProcessingChain.receivePayload()

    String processingChainUnderTest = String.format("%s --prefix=%s --suffix=%s", moduleName, prefix, suffix);

    SingleNodeProcessingChain chain = chain(application, streamName, processingChainUnderTest);

    chain.sendPayload("hello");
    String result = (String) chain.receivePayload(RECEIVE_TIMEOUT);
    assertEquals(prefix + "hello" + suffix, result);

    chain.destroy();
  }
View Full Code Here

Examples of org.springframework.xd.dirt.test.process.SingleNodeProcessingChain.receivePayload()

    String processingChainUnderTest = String.format("%s --prefix=%s --prefixOnly=true", moduleName, prefix);

    SingleNodeProcessingChain chain = chain(application, streamName, processingChainUnderTest);

    chain.sendPayload("hello");
    String result = (String) chain.receivePayload(RECEIVE_TIMEOUT);
    assertEquals(prefix + "hello", result);

    chain.destroy();
  }
View Full Code Here

Examples of org.springframework.xd.dirt.test.process.SingleNodeProcessingChainConsumer.receivePayload()

    String processingChainUnderTest = "time | transform --expression='T(org.joda.time.format.DateTimeFormat).forPattern(\"yyyy-MM-dd HH:mm:ss\").parseDateTime(payload)'";

    SingleNodeProcessingChainConsumer chain = chainConsumer(application, "dateToDateTime", processingChainUnderTest);

    Object payload = chain.receivePayload(RECEIVE_TIMEOUT);
    assertTrue(payload instanceof DateTime);

    chain.destroy();
  }
View Full Code Here

Examples of org.springframework.xd.dirt.test.sink.NamedChannelSink.receivePayload()

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(integrationSupport.messageBus()).createNamedChannelSource("queue:mqttsource");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(integrationSupport.messageBus()).createNamedChannelSink("queue:mqttsink");

    Thread.sleep(1000);
    source.sendPayload("hello");
    Object result = sink.receivePayload(1000);

    assertEquals("hello", result);
    source.unbind();
    sink.unbind();
  }
View Full Code Here

Examples of org.springframework.xd.dirt.test.sink.NamedChannelSink.receivePayload()

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource(TOPIC_FOO);

    source.sendPayload("hello");

    final Object bar1 = bar1sink.receivePayload(10000);
    final Object bar2 = bar2sink.receivePayload(10000);
    assertEquals("hello", bar1);
    assertEquals("hello", bar2);

    source.unbind();
    bar1sink.unbind();
View Full Code Here

Examples of org.springframework.xd.dirt.test.sink.NamedChannelSink.receivePayload()

    source.sendPayload("a");
    source.sendPayload("b");

    final Object fooPayload = foosink.receivePayload(10000);
    final Object barPayload = barsink.receivePayload(10000);

    assertEquals("a", fooPayload);
    assertEquals("b", barPayload);

    source.unbind();
View Full Code Here

Examples of org.springframework.xd.dirt.test.sink.NamedChannelSink.receivePayload()

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(messageBus).createNamedChannelSource("queue:producer");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(messageBus).createNamedChannelSink("queue:consumer");

    source.sendPayload("ping");
    String result = (String) sink.receivePayload(5000);
    assertEquals(expected, result);

    source.unbind();
    sink.unbind();
View Full Code Here

Examples of org.springframework.xd.dirt.test.sink.NamedChannelSink.receivePayload()

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(messageBus).createNamedChannelSource("queue:producer");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(messageBus).createNamedChannelSink("queue:consumer");

    source.sendPayload("hello");
    String result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
    assertEquals("HELLO", result);

    source.sendPayload("a");
    result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
    assertNull(result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.