Package org.springframework.xd.test.fixtures

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


  }

  @Test
  public void testExpressionTransformProcessor() {
    HttpSource httpSource = newHttpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(),
        "%s | transform --expression=payload.toString().toUpperCase() | %s",
        httpSource, fileSink);
    httpSource.ensureReady().postData("hello").postData("World").postData("!");
    assertThat(fileSink, eventually(hasContentsThat(equalTo("HELLOWORLD!"))));
View Full Code Here


  public void testHttpPostAsciiText() throws InterruptedException, IOException {

    final HttpSource httpSource = newHttpSource();

    final String stringToPost = "hello";
    final FileSink fileSink = newFileSink().binary(true);

    final String streamName = generateStreamName();
    final String stream = String.format("%s | %s", httpSource, fileSink);

    logger.info("Creating Stream: " + stream);
View Full Code Here

   */
  @Test
  public void testHttpPostUtfText() throws InterruptedException, IOException {

    final HttpSource httpSource = newHttpSource();
    final FileSink fileSink = newFileSink().binary(true);

    /** I want to go to Japan. */
    final String stringToPostInJapanese = "\u65e5\u672c\u306b\u884c\u304d\u305f\u3044\u3002";

    final String streamName = generateStreamName();
View Full Code Here

  }

  @Test
  public void testReadingFromFile() throws Exception {
    final File tempFileIn = testFolder.newFile("utfdatain.txt");
    final FileSink fileSink = newFileSink().binary(true);

    final HttpSource source = newHttpSource();

    /* I want to go to Japan. */
    final String stringToPostInJapanese = "\u65e5\u672c\u306b\u884c\u304d\u305f\u3044\u3002";
View Full Code Here

TOP

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

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.