Package org.springframework.xd.test.fixtures

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


  }

  @Test
  public void testMailSink() throws Exception {
    HttpSource httpSource = newHttpSource();
    MailSink mailSink = newMailSink();

    mailSink.ensureStarted()
        .to("'\"some.one@domain.com\"'")
        .subject("payload");


    stream().create(generateStreamName(), "%s | %s", httpSource, mailSink);

    httpSource.ensureReady().postData("Woohoo!");
    MimeMessage result = mailSink.waitForEmail();

    Assert.assertEquals("Woohoo!\r\n", result.getContent());
    Assert.assertEquals("Woohoo!", result.getSubject());

  }
View Full Code Here


    disposables.add(nonPollingImapSource);
    return nonPollingImapSource;
  }

  protected MailSink newMailSink() {
    MailSink mailSink = new MailSink();
    disposables.add(mailSink);
    return mailSink;
  }
View Full Code Here

TOP

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

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.