Examples of ensureReady()


Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    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

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    logger.info("Creating Stream: " + stream);
    stream().create(streamName, stream);

    logger.info("Posting String: " + stringToPost);
    httpSource.ensureReady().postData(stringToPost);

    assertThat(fileSink, eventually(hasContentsThat(equalTo(stringToPost))));

  }
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    logger.info("Creating Stream: " + stream);
    stream().create(streamName, stream);

    logger.info("Posting String: " + stringToPostInJapanese);
    httpSource.ensureReady().postData(stringToPostInJapanese);


    assertThat(fileSink, eventually(hasContentsThat(equalTo(stringToPostInJapanese))));

  }
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

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

    stream().create(streamName, stream);

    source.ensureReady().useContentType(String.format("text/plain;charset=%s", inCharset)).postFromFile(tempFileIn);

    assertThat(fileSink, eventually(hasContentsThat(equalTo(stringToPostInJapanese))));

  }
}
View Full Code Here

Examples of org.springframework.xd.shell.command.fixtures.HttpSource.ensureReady()

    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);
    httpSource.ensureReady().postData("test");
    assertThat(counterSink, eventually(hasValue("1")));
  }
}
View Full Code Here

Examples of org.springframework.xd.test.fixtures.TcpSource.ensureReady()

    TcpSource tcpSource = newTcpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(), "%s | %s", tcpSource, fileSink);

    // Following \r\n is because of CRLF deserializer
    tcpSource.ensureReady().sendBytes("Hello\r\n".getBytes("UTF-8"));
    assertThat(fileSink, eventually(hasContentsThat(equalTo("Hello"))));
  }

  @Test
  public void testTcpSink() throws Exception {
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.