svn commit: r1037260 - /camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingHeadersTest.java

2010-11-20 Thread davsclaus
Author: davsclaus
Date: Sat Nov 20 16:45:52 2010
New Revision: 1037260

URL: http://svn.apache.org/viewvc?rev=1037260&view=rev
Log:
CAMEL-3345: Added unit test

Modified:

camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingHeadersTest.java

Modified: 
camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingHeadersTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingHeadersTest.java?rev=1037260&r1=1037259&r2=1037260&view=diff
==
--- 
camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingHeadersTest.java
 (original)
+++ 
camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailUsingHeadersTest.java
 Sat Nov 20 16:45:52 2010
@@ -27,7 +27,7 @@ import org.junit.Test;
 import org.jvnet.mock_javamail.Mailbox;
 
 /**
- * Unit test for Mail using camel headers to set recipeient subject.
+ * Unit test for Mail using camel headers to set recipient subject.
  */
 public class MailUsingHeadersTest extends CamelTestSupport {
 
@@ -52,6 +52,23 @@ public class MailUsingHeadersTest extend
 assertEquals("Camel rocks", msg.getSubject());
 }
 
+@Test
+public void testMailWithFromInEndpoint() throws Exception {
+Mailbox.clearAll();
+
+Map map = new HashMap();
+map.put("Subject", "Camel rocks");
+
+String body = "Hello Claus.\nYes it does.\n\nRegards James.";
+template.sendBodyAndHeaders("smtp://davscl...@apache.org?from=james 
Strachan &to=davscl...@apache.org", body, map);
+
+Mailbox box = Mailbox.get("davscl...@apache.org");
+Message msg = box.get(0);
+assertEquals("davscl...@apache.org", 
msg.getRecipients(Message.RecipientType.TO)[0].toString());
+assertEquals("James Strachan ", 
msg.getFrom()[0].toString());
+assertEquals("Camel rocks", msg.getSubject());
+}
+
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 public void configure() throws Exception {




[CONF] Apache Camel > Articles

2010-11-20 Thread confluence







Articles
Page edited by Claus Ibsen


 Changes (2)
 



...
* [Virtual ESB - application integration made painless with Apache Camel|http://pjagielski.blogspot.com/2010/09/virtual-esb-application-integration.html] by Piotr Jagielski shows how to use Camel as a lightweight integration using web service and XML. * [Java integration frameworks - Spring Integration vs. Apache Camel|http://www.journaldunet.com/developpeur/java-j2ee/spring-integration-vs-apache-camel/] Article from April 2010 which compares the two frameworks (*in french*). 
* [Devoxx talk about Apache Camel|http://blog.whitehorses.nl/2010/11/19/devoxx-talk-about-apache-camel-claus-ibsen/] - Impressions from the talk by Jos Nieuwenhuis 
  
...
* [Claus Ibsen's|http://www.slideshare.net/davsclaus/fuse-community-day-london-2010-apache-camel-presentation] Apache Camel presentation at the [FUSE|http://fusesource.com/] community day in London 2010. * [FuseSource presentation|http://fusesource.com/community/events/] FuseSource presentation on Camel and other related Apache projects 
* [Claus Ibsen presented Apache Camel at Devoxx 2010|http://www.slideshare.net/davsclaus/apache-camel-devoxx-2010] - Slides from [the presentation|http://devoxx.com/display/Devoxx2K10/Apache+Camel,+a+powerful+open+source+integration+framework] Claus did at the Devoxx conference.  
 
h2. Webinar or Video presentations on Camel * [James Strachan's|http://macstrac.blogspot.com/] [Devoxx 2009 talk|http://www.parleys.com/#sl=11&st=5&id=1577] is mostly about Camel and ActiveMQ 
...

Full Content

See alsoSee also Camel User Stories.

Articles on Apache Camel

	A bit more meat: Camel applied : JMS to File by Mike McLean
	Mathew Thomas posted his thoughts on Apache Camel including a sample project
	Matteo wrote a blog entry about using Camel with iBatis
	Knowledge Tree integration using Apache Camel
	Integrating Apache Camel with JBoss ESB by Edgar Ankiewsky
	Simple DSL OSGi bundle example by Andrej Koelewijn
	Realization of EAI Patterns with Apache Camel by Pascal Kolb at the Universität Stuttgart
	Spring Remoting with JMS Example on Amin Abbaspour's Weblog
	Implementing Fuji integration scenario using Camel SE by Louis Polycarpou on using Camel with Open ESB
	Using the Camel aggregator correctly by Torsten Mielke, a great blog entry how to use the Camel aggregator.
	Camel routes and HL7 by Roger Searjeant on using Camel and its HL7 support in the health care space.
	Combining ApacheCamel+BSF to make JBoss ESB polyglot by Edgard Ankiewsky Silva, a JBoss employeer.
	Groovy and Grape - easiest way to send gtalk message with Apache Camel by Andrej Koelewijn how easy it is to use Groovy and Grape to quickly try out new frameworks such as Apache Camel.
	Domain-Specific Languages (DSLs) in Apache Camel (Spanish) by Gema Perdiguero, Tecsisa.
	Apache Camel integration in ServiceMix (Spanish) by Sebastián Gómez, Tecsisa.
	Apache Camel: Integration Nirvana by Jonathan Anstey Great for learning what Camel is and what it can do
	Leverage EIP with Apache Camel and Twitter by Bruno Borges
	Apache Camel Reference Card at DZone (the first card out of two) by Claus Ibsen
	Using RSS with Apache Camel by Jeroen Reijn
	Using Groovy and Camel to pool Google Analyst email reports by Mr. Haki
	Using grails-camel plugin to work with Camel in Grails land by Mr. Haki
	Send mail with Apache Camel from Gails by Mr. Haki
	Navigating the Integration Landscape - Claus Ibsen on Apache Camel Claus Ibsen was interviewed at DZone discussing the integration landscape
	Apache Camel: Enterprise Integration met scripttalen en DSLs (Dutch) by Peter Maas, Finalist IT Group.
	Axis 2 ride with Camel how to use Axis 2 with the Camel report incident tutorial by Sagara
	Introduction to the Open eHealth Integration Platform (based on top of Apache Camel) Excellent DZone article by Martin Krasser
	An IRC alerter written using Apache Camel and Java how to easily integrate IRC with Camel to monitor and do alerts.
	Entreprise Integration Pattern with Apache Camel 2.0 by Julien Dechmann, how to use Camel to split and transform CSV files to POJO and XML and sending to a JMS destination
	A Camel based XML payload HTTP polling provider by Christopher Hunt to use Camel with AJAX. Interesting read.
	Camel vs. JBI by Adrian Trenaman.
	Things to consider when selecting between Apache Camel and Apache Servicemix by Ashwin Karpe
	Groovy and Camel for monitoring ActiveMQ by Eric Hauser how to monitor AMQ Advisory queues from a single groovy file.
	Camellos - Discovering Apache Camel by Gunnar Hillert. A very nice and short blog series about Camel showing its powers in a simple and intuitive way. Highly recommended for new users
	Apache Camel alternati