use of org.junit.Before in project camel by apache.
the class JpaPollingConsumerLockEntityTest method setUp.
@Before
@Override
public void setUp() throws Exception {
super.setUp();
Customer customer = new Customer();
customer.setName("Donald Duck");
saveEntityInDB(customer);
Customer customer2 = new Customer();
customer2.setName("Goofy");
saveEntityInDB(customer2);
assertEntityInDB(2, Customer.class);
}
use of org.junit.Before in project camel by apache.
the class LdapRouteTest method setup.
@Before
public void setup() throws Exception {
// you can assign port number in the @CreateTransport annotation
port = super.getLdapServer().getPort();
LdapContext ctx = getWiredContext(ldapServer);
SimpleRegistry reg = new SimpleRegistry();
reg.put("localhost:" + port, ctx);
camel = new DefaultCamelContext(reg);
template = camel.createProducerTemplate();
}
use of org.junit.Before in project camel by apache.
the class MailSplitAttachmentsTest method setup.
@Before
public void setup() {
// create the exchange with the mail message that is multipart with a file and a Hello World text/plain message.
endpoint = context.getEndpoint("smtp://james@mymailserver.com?password=secret");
exchange = endpoint.createExchange();
Message in = exchange.getIn();
in.setBody("Hello World");
in.addAttachment("logo.jpeg", new DataHandler(new FileDataSource("src/test/data/logo.jpeg")));
in.addAttachment("license.txt", new DataHandler(new FileDataSource("src/main/resources/META-INF/LICENSE.txt")));
}
use of org.junit.Before in project camel by apache.
the class MultipleDestinationConsumeTest method setUp.
@Override
@Before
public void setUp() throws Exception {
Properties properties = new Properties();
properties.put("mail.smtp.host", "localhost");
mailSession = Session.getInstance(properties, null);
super.setUp();
}
use of org.junit.Before in project camel by apache.
the class MailMessageTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
Mailbox.clearAll();
endpoint = resolveMandatoryEndpoint("pop3://someone@myhost:30/subject");
Properties properties = new Properties();
properties.put("mail.smtp.host", "localhost");
mailSession = Session.getInstance(properties, null);
mimeMessage = new MimeMessage(mailSession);
mimeMessage.setText(body);
}
Aggregations