Package org.springframework.xd.test.fixtures

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


   *
   * @param port the port to connect to
   * @return an instance of TcpSink
   */
  public TcpSink tcp(int port) {
    return new TcpSink(port);
  }
View Full Code Here


    assertThat(fileSink, eventually(hasContentsThat(equalTo("Hello"))));
  }

  @Test
  public void testTcpSink() throws Exception {
    TcpSink tcpSink = newTcpSink().start();
    HttpSource httpSource = newHttpSource();

    stream().create(generateStreamName(), "%s | %s", httpSource, tcpSink);
    httpSource.ensureReady().postData("Hi there!");
View Full Code Here

    private TcpSinkContentsMatcher(String expected) {
      this.expected = expected;
    }

    private String getSinkContents(Object sink) {
      TcpSink tcpSink = (TcpSink) sink;
      try {
        return new String(tcpSink.getReceivedBytes(), "ISO-8859-1");
      }
      catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

  protected TcpSource newTcpSource() {
    return new TcpSource();
  }

  protected TcpSink newTcpSink() {
    TcpSink tcpSink = new TcpSink();
    disposables.add(tcpSink);
    return tcpSink;
  }
View Full Code Here

TOP

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

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.