Author: simonetripodi
Date: Fri Apr  8 11:11:10 2011
New Revision: 1090201

URL: http://svn.apache.org/viewvc?rev=1090201&view=rev
Log:
Added a test to demostrate DISCOVERY-7 is not a valid bug

Added:
    
commons/proper/discovery/trunk/src/test/META-INF/services/org.apache.commons.discovery.test.TestInterface3
    
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
   (with props)
    
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
   (with props)
Modified:
    
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java

Added: 
commons/proper/discovery/trunk/src/test/META-INF/services/org.apache.commons.discovery.test.TestInterface3
URL: 
http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/test/META-INF/services/org.apache.commons.discovery.test.TestInterface3?rev=1090201&view=auto
==============================================================================
--- 
commons/proper/discovery/trunk/src/test/META-INF/services/org.apache.commons.discovery.test.TestInterface3
 (added)
+++ 
commons/proper/discovery/trunk/src/test/META-INF/services/org.apache.commons.discovery.test.TestInterface3
 Fri Apr  8 11:11:10 2011
@@ -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.
+
+# $Id: org.apache.commons.discovery.test.TestInterface2 1088285 2011-04-03 
13:24:46Z simonetripodi $
+
+org.apache.commons.discovery.test.TestImpl3$InnerTestImpl

Modified: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
URL: 
http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java?rev=1090201&r1=1090200&r2=1090201&view=diff
==============================================================================
--- 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
 (original)
+++ 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestAll.java
 Fri Apr  8 11:11:10 2011
@@ -278,6 +278,18 @@ public class TestAll {
     }
 
     @Test
+    public void findInnerImplViaDiscoverClass() {
+        ClassLoaders loaders = 
ClassLoaders.getAppLoaders(TestInterface3.class, getClass(), false);
+
+        DiscoverClass discover = new DiscoverClass(loaders);
+        Class<? extends TestInterface3> implClass = 
discover.find(TestInterface3.class);
+
+        assertTrue("Failed to find an implementation class", implClass != 
null);
+        
assertEquals("org.apache.commons.discovery.test.TestImpl3$InnerTestImpl", 
implClass.getName());
+
+    }
+
+    @Test
     public void instantiateViaDiscoverClass() throws Exception {
         ClassLoaders loaders = 
ClassLoaders.getAppLoaders(TestInterface2.class, getClass(), false);
 

Added: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
URL: 
http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java?rev=1090201&view=auto
==============================================================================
--- 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
 (added)
+++ 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
 Fri Apr  8 11:11:10 2011
@@ -0,0 +1,29 @@
+/*
+ * 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.commons.discovery.test;
+
+public final class TestImpl3 {
+
+    public static class InnerTestImpl implements TestInterface3 {
+
+        public void method() {
+            // do nothing
+        }
+
+    }
+
+}

Propchange: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestImpl3.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
URL: 
http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java?rev=1090201&view=auto
==============================================================================
--- 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
 (added)
+++ 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
 Fri Apr  8 11:11:10 2011
@@ -0,0 +1,23 @@
+/*
+ * 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.commons.discovery.test;
+
+public interface TestInterface3 {
+
+    public void method();
+
+}

Propchange: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/proper/discovery/trunk/src/test/org/apache/commons/discovery/test/TestInterface3.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to