camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r698449 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/
Date Wed, 24 Sep 2008 07:38:21 GMT
Author: davsclaus
Date: Wed Sep 24 00:38:20 2008
New Revision: 698449

URL: http://svn.apache.org/viewvc?rev=698449&view=rev
Log:
CAMEL-931. Changed some defaults for camel-mail configuration to be more sensible

Modified:
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java?rev=698449&r1=698448&r2=698449&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
Wed Sep 24 00:38:20 2008
@@ -50,9 +50,9 @@
     private String defaultEncoding;
     private String from = DEFAULT_FROM;
     private String folderName = DEFAULT_FOLDER_NAME;
-    private boolean deleteProcessedMessages = true;
+    private boolean deleteProcessedMessages;
     private boolean ignoreUriScheme;
-    private boolean processOnlyUnseenMessages;
+    private boolean processOnlyUnseenMessages = true;
     private Map<Message.RecipientType, String> recipients = new HashMap<Message.RecipientType,
String>();
     private String destination;
     private int fetchSize = -1;

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java?rev=698449&r1=698448&r2=698449&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
Wed Sep 24 00:38:20 2008
@@ -69,10 +69,11 @@
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
         assertEquals("password", "secret", config.getPassword());
-        assertEquals(true, config.isDeleteProcessedMessages());
+        assertEquals(false, config.isDeleteProcessedMessages());
         assertEquals(false, config.isIgnoreUriScheme());
         assertEquals("fetchSize", -1, config.getFetchSize());
         assertEquals("contentType", "text/plain", config.getContentType());
+        assertEquals("processOnlyUnseenMessages", true, config.isProcessOnlyUnseenMessages());
     }
 
     public void testDefaultPOP3Configuration() throws Exception {
@@ -87,10 +88,11 @@
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
         assertEquals("password", "secret", config.getPassword());
-        assertEquals(true, config.isDeleteProcessedMessages());
+        assertEquals(false, config.isDeleteProcessedMessages());
         assertEquals(false, config.isIgnoreUriScheme());
         assertEquals("fetchSize", -1, config.getFetchSize());
         assertEquals("contentType", "text/plain", config.getContentType());
+        assertEquals("processOnlyUnseenMessages", true, config.isProcessOnlyUnseenMessages());
     }
 
     public void testDefaultIMAPConfiguration() throws Exception {
@@ -105,15 +107,17 @@
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
         assertEquals("password", "secret", config.getPassword());
-        assertEquals(true, config.isDeleteProcessedMessages());
+        assertEquals(false, config.isDeleteProcessedMessages());
         assertEquals(false, config.isIgnoreUriScheme());
         assertEquals("fetchSize", -1, config.getFetchSize());
         assertEquals("contentType", "text/plain", config.getContentType());
+        assertEquals("processOnlyUnseenMessages", true, config.isProcessOnlyUnseenMessages());
     }
 
     public void testManyConfigurations() throws Exception {
         MailEndpoint endpoint = resolveMandatoryEndpoint("smtp://james@myhost:30/subject?password=secret"
-            + "&from=me@camelriders.org&deleteProcessedMessages=false&defaultEncoding=iso-8859-1&folderName=riders&contentType=text/html");
+            + "&from=me@camelriders.org&deleteProcessedMessages=true&defaultEncoding=iso-8859-1&folderName=riders"
+            + "&contentType=text/html&processOnlyUnseenMessages=false");
         MailConfiguration config = endpoint.getConfiguration();
         assertEquals("getProtocol()", "smtp", config.getProtocol());
         assertEquals("getHost()", "myhost", config.getHost());
@@ -124,9 +128,10 @@
         assertEquals("encoding", "iso-8859-1", config.getDefaultEncoding());
         assertEquals("from", "me@camelriders.org", config.getFrom());
         assertEquals("password", "secret", config.getPassword());
-        assertEquals(false, config.isDeleteProcessedMessages());
+        assertEquals(true, config.isDeleteProcessedMessages());
         assertEquals(false, config.isIgnoreUriScheme());
         assertEquals("fetchSize", -1, config.getFetchSize());
+        assertEquals("processOnlyUnseenMessages", false, config.isProcessOnlyUnseenMessages());
         assertEquals("contentType", "text/html", config.getContentType());
     }
 
@@ -142,7 +147,7 @@
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
         assertEquals("password", "secret", config.getPassword());
-        assertEquals(true, config.isDeleteProcessedMessages());
+        assertEquals(false, config.isDeleteProcessedMessages());
         assertEquals(false, config.isIgnoreUriScheme());
         assertEquals("fetchSize", -1, config.getFetchSize());
     }
@@ -159,7 +164,7 @@
         assertEquals("encoding", null, config.getDefaultEncoding());
         assertEquals("from", "camel@localhost", config.getFrom());
         assertEquals("password", "secret", config.getPassword());
-        assertEquals(true, config.isDeleteProcessedMessages());
+        assertEquals(false, config.isDeleteProcessedMessages());
         assertEquals(false, config.isIgnoreUriScheme());
         assertEquals("fetchSize", -1, config.getFetchSize());
     }

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java?rev=698449&r1=698448&r2=698449&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
Wed Sep 24 00:38:20 2008
@@ -88,7 +88,8 @@
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("pop3://jones@localhost?password=secret&fetchSize=2&consumer.delay=5000").to("mock:result");
+                from("pop3://jones@localhost?password=secret&fetchSize=2&consumer.delay=5000"
+                    + "&deleteProcessedMessages=true").to("mock:result");
             }
         };
     }



Mime
View raw message