activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r530557 - in /activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl: ./ DefaultCamelContextTest.java
Date Thu, 19 Apr 2007 21:34:42 GMT
Author: chirino
Date: Thu Apr 19 14:34:42 2007
New Revision: 530557

URL: http://svn.apache.org/viewvc?view=rev&rev=530557
Log:
Added test case for auto component creation.

Added:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java

Added: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java?view=auto&rev=530557
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java
(added)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextTest.java
Thu Apr 19 14:34:42 2007
@@ -0,0 +1,44 @@
+/**
+ *
+ * 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.impl;
+
+import junit.framework.TestCase;
+
+import org.apache.camel.Component;
+import org.apache.camel.component.pojo.PojoComponent;
+
+/**
+ * @version $Revision: 525634 $
+ */
+public class DefaultCamelContextTest extends TestCase {
+
+	public void testAutoCreateComponentsOn() {
+		DefaultCamelContext ctx = new DefaultCamelContext();
+		Component component = ctx.getComponent("pojo");
+		assertNotNull(component);
+		assertEquals(component.getClass(), PojoComponent.class);
+	}
+	
+	public void testAutoCreateComponentsOff() {
+		DefaultCamelContext ctx = new DefaultCamelContext();
+		ctx.setAutoCreateComponents(false);
+		Component component = ctx.getComponent("pojo");
+		assertNull(component);		
+	}
+	
+}



Mime
View raw message