You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/06/09 02:37:34 UTC
svn commit: r782850 - in
/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util:
./ AnnotationModuleLoaderTest.java
Author: ningjiang
Date: Tue Jun 9 00:37:34 2009
New Revision: 782850
URL: http://svn.apache.org/viewvc?rev=782850&view=rev
Log:
Added unit test for AnnotationModuleLoader
Added:
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java (with props)
Added: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java?rev=782850&view=auto
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java (added)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java Tue Jun 9 00:37:34 2009
@@ -0,0 +1,39 @@
+/**
+ * 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.bindy.util;
+
+import java.util.Set;
+
+import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Client;
+import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Order;
+import org.apache.camel.impl.DefaultPackageScanClassResolver;
+import org.junit.Test;
+import junit.framework.Assert;
+
+public class AnnotationModuleLoaderTest extends Assert {
+
+ @Test
+ public void testLoadModels() throws Exception {
+ AnnotationModelLoader loader = new AnnotationModelLoader(new DefaultPackageScanClassResolver());
+ Set<Class> classes = loader.loadModels("org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink");
+ assertNotNull("The find classes should not be null ", classes);
+ assertEquals("There should have 2 classes", 2, classes.size());
+ assertTrue(classes.contains(Client.class));
+ assertTrue(classes.contains(Order.class));
+ }
+
+}
Propchange: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date