You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2009/02/03 15:31:40 UTC
svn commit: r740310 - in /camel/trunk/components/camel-rss/src:
main/resources/META-INF/services/org/apache/camel/
test/java/org/apache/camel/dataformat/rss/ test/resources/
Author: janstey
Date: Tue Feb 3 14:31:40 2009
New Revision: 740310
URL: http://svn.apache.org/viewvc?rev=740310&view=rev
Log:
Enlist type converters for RSS data types
Added:
camel/trunk/components/camel-rss/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssConverterTest.java (with props)
Modified:
camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java
camel/trunk/components/camel-rss/src/test/resources/log4j.properties
Added: camel/trunk/components/camel-rss/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rss/src/main/resources/META-INF/services/org/apache/camel/TypeConverter?rev=740310&view=auto
==============================================================================
--- camel/trunk/components/camel-rss/src/main/resources/META-INF/services/org/apache/camel/TypeConverter (added)
+++ camel/trunk/components/camel-rss/src/main/resources/META-INF/services/org/apache/camel/TypeConverter Tue Feb 3 14:31:40 2009
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.camel.dataformat.rss
\ No newline at end of file
Added: camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssConverterTest.java?rev=740310&view=auto
==============================================================================
--- camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssConverterTest.java (added)
+++ camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssConverterTest.java Tue Feb 3 14:31:40 2009
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dataformat.rss;
+
+import com.sun.syndication.feed.synd.SyndFeed;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class RssConverterTest extends RssDataFormatTest {
+
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ public void configure() throws Exception {
+ // START SNIPPET: ex
+ from("rss:file:src/test/data/rss20.xml?splitEntries=false&consumer.delay=1000").convertBodyTo(String.class).to("mock:marshal");
+ // END SNIPPET: ex
+ from("rss:file:src/test/data/rss20.xml?splitEntries=false&consumer.delay=1000").convertBodyTo(String.class).convertBodyTo(SyndFeed.class).to("mock:unmarshal");
+ }
+ };
+ }
+
+}
Propchange: camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssConverterTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java?rev=740310&r1=740309&r2=740310&view=diff
==============================================================================
--- camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java (original)
+++ camel/trunk/components/camel-rss/src/test/java/org/apache/camel/dataformat/rss/RssDataFormatTest.java Tue Feb 3 14:31:40 2009
@@ -35,7 +35,6 @@
public void testMarshalling() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:marshal");
mock.expectedMessageCount(1);
- mock.message(0).body().isInstanceOf(byte[].class);
mock.message(0).bodyAs(String.class).contains(feedXml);
mock.assertIsSatisfied();
}
Modified: camel/trunk/components/camel-rss/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rss/src/test/resources/log4j.properties?rev=740310&r1=740309&r2=740310&view=diff
==============================================================================
--- camel/trunk/components/camel-rss/src/test/resources/log4j.properties (original)
+++ camel/trunk/components/camel-rss/src/test/resources/log4j.properties Tue Feb 3 14:31:40 2009
@@ -36,5 +36,5 @@
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.file.file=target/camel-atom-test.log
+log4j.appender.file.file=target/camel-rss-test.log
log4j.appender.file.append=true