Package org.springframework.xd.test.fixtures

Examples of org.springframework.xd.test.fixtures.FileSink$FileSinkContentsMatcher


*/
public class ModuleClasspathTests extends AbstractStreamIntegrationTest {
  //todo:What is the purpose of this test?
  @Test
  public void testModuleWithClasspathAfterServerStarted() throws Exception {
    FileSink fileSink = newFileSink();
    stream().create(generateStreamName(), "time2 | %s", fileSink);
    assertThat(fileSink, eventually(hasContentsThat(not(isEmptyOrNullString()))));
  }
View Full Code Here


    assertThat(fileSink, eventually(hasContentsThat(not(isEmptyOrNullString()))));
  }

  @Test
  public void testUberJarModule() {
    FileSink fileSink = newFileSink();
    stream().create(generateStreamName(), "time3 | %s", fileSink);
    assertThat(fileSink, eventually(hasContentsThat(not(isEmptyOrNullString()))));
  }
View Full Code Here

    assertThat(fileSink, eventually(hasContentsThat(not(isEmptyOrNullString()))));
  }

  @Test
  public void testJavaConfigModule() {
    FileSink fileSink = newFileSink();
    stream().create(generateStreamName(), "time | siDslModule --prefix=foo --suffix=bar| %s", fileSink);
    assertThat(fileSink, eventually(allOf(hasContentsThat(containsString("foo")), hasContentsThat(containsString
        ("bar")))));
  }
View Full Code Here

  }

  @Test
  public void testAggregatorNormalRelease() throws IOException {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);

    stream().create(
        generateStreamName(),
        "%s | aggregator --count=3 --aggregation=T(org.springframework.util.StringUtils).collectionToDelimitedString(#this.![payload],' ') | %s",
        httpSource, fileSink);
View Full Code Here

  }

  @Test
  public void testAggregatorEarlyRelease() throws IOException {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);

    int timeout = 1000;

    stream().create(
        generateStreamName(),
View Full Code Here

  }

  @Test
  public void testAggregatorCorrelation() throws IOException {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);

    stream().create(
        generateStreamName(),
        "%s | aggregator --count=3 --aggregation=T(org.springframework.util.StringUtils).collectionToDelimitedString(#this.![payload],' ') "
            + "--correlation=payload.length() | %s",
View Full Code Here

  }

  @Test
  public void testScriptTransformProcessor() {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/transform-to-lowercase.groovy' | %s",
        httpSource, fileSink);
    httpSource.ensureReady().postData("HELLO").postData("World").postData("!");
    assertThat(fileSink, eventually(hasContentsThat(equalTo("helloworld!"))));
View Full Code Here

  }

  @Test
  public void testScriptTransformProcessorWithPropertiesLocation() {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/script-with-variables.groovy' " +
            "--propertiesLocation='org/springframework/xd/shell/command/script.properties'" +
            " | %s",
        httpSource, fileSink);
View Full Code Here

  }

  @Test
  public void testScriptTransformProcessorWithInlineProperties() {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/script-with-variables.groovy' " +
            "--variables='foo=FOO'" +
            " | %s",
        httpSource, fileSink);
View Full Code Here

  }

  @Test
  public void testScriptInlinePropertiesOverridesLocation() {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(),
        "%s | transform --script='org/springframework/xd/shell/command/script-with-variables.groovy' " +
            "--variables='foo=BAR' --propertiesLocation='org/springframework/xd/shell/command/script.properties'" +
            " | %s",
        httpSource, fileSink);
View Full Code Here

TOP

Related Classes of org.springframework.xd.test.fixtures.FileSink$FileSinkContentsMatcher

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.