tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r471506 - in /incubator/tuscany/java/sca/services/persistence/datasource/src: main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java test/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoaderTestCase.java
Date Sun, 05 Nov 2006 19:47:43 GMT
Author: jmarino
Date: Sun Nov  5 11:47:43 2006
New Revision: 471506

URL: http://svn.apache.org/viewvc?view=rev&rev=471506
Log:
more testcases

Modified:
    incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
    incubator/tuscany/java/sca/services/persistence/datasource/src/test/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoaderTestCase.java

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java?view=diff&rev=471506&r1=471505&r2=471506
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/main/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoader.java
Sun Nov  5 11:47:43 2006
@@ -73,6 +73,14 @@
         implementation.setComponentType(componentType);
     }
 
+    /**
+     * Creates properties by introspecting the provider class an d including all JavaBean
setters that take a simple
+     * type parameter
+     *
+     * @param componentType
+     * @param provider
+     * @throws AmbiguousPropertyException
+     */
     @SuppressWarnings("unchecked")
     private void introspectProperties(ComponentType<ServiceDefinition, ReferenceDefinition,
Property<?>> componentType,
                                       Class<?> provider) throws AmbiguousPropertyException
{

Modified: incubator/tuscany/java/sca/services/persistence/datasource/src/test/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/persistence/datasource/src/test/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoaderTestCase.java?view=diff&rev=471506&r1=471505&r2=471506
==============================================================================
--- incubator/tuscany/java/sca/services/persistence/datasource/src/test/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoaderTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/persistence/datasource/src/test/java/org/apache/tuscany/persistence/datasource/DSComponentTypeLoaderTestCase.java
Sun Nov  5 11:47:43 2006
@@ -30,6 +30,19 @@
     }
 
 
+    public void testOverloadedMethod() throws Exception {
+        DSComponentTypeLoader loader = new DSComponentTypeLoader(null);
+        DataSourceImplementation implementation = new DataSourceImplementation();
+        implementation.setProviderName(BadFoo.class.getName());
+        implementation.setClassLoader(getClass().getClassLoader());
+        try {
+            loader.load(null, implementation, null);
+            fail();
+        } catch (AmbiguousPropertyException e) {
+            // expected
+        }
+    }
+
     public class Foo {
 
         private String bar;
@@ -62,4 +75,14 @@
             this.object = object;
         }
     }
+
+    public class BadFoo {
+
+        public void setBar(String bar) {
+        }
+
+        public void setBar(Object bar) {
+        }
+    }
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message