Package org.springframework.xd.dirt.test.process

Examples of org.springframework.xd.dirt.test.process.SingleNodeProcessingChain


   */
  @Test
  public void processingChain() {
    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);

    chain.destroy();
  }
View Full Code Here


    String streamName = "testDefault";


    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

    String suffix = "bar";
    String streamName = "testPrefixOnly";

    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

    String prefix = "foo";
    String suffix = "foo";
    String streamName = "testPrefixNotSameAsSuffix";

    String processingChainUnderTest = String.format("%s --prefix=%s --suffix=%s", moduleName, prefix, suffix);
    SingleNodeProcessingChain chain = chain(application, streamName, processingChainUnderTest);
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.test.process.SingleNodeProcessingChain

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.