aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1125437 - in /aries/trunk/spi-fly/spi-fly-core/src: main/java/org/apache/aries/spifly/ test/java/org/apache/aries/spifly/ test/java/org/apache/aries/spifly/impl2/ test/java/org/apache/aries/spifly/impl3/ test/resources/
Date Fri, 20 May 2011 15:43:34 GMT
Author: davidb
Date: Fri May 20 15:43:33 2011
New Revision: 1125437

URL: http://svn.apache.org/viewvc?rev=1125437&view=rev
Log:
Increase test coverage on ProviderBundleTrackerCustomizer.


Added:
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2a.java
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2b.java
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl3/
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl3/MySPIImpl3.java
    aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded.jar   (with props)
    aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded2.jar   (with props)
Removed:
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/AltTestClient.java.todo
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/UnaffectedTestClient.java.todo
Modified:
    aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
    aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java

Modified: aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java?rev=1125437&r1=1125436&r2=1125437&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
(original)
+++ aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizer.java
Fri May 20 15:43:33 2011
@@ -43,15 +43,13 @@ import org.osgi.util.tracker.BundleTrack
  */
 public class ProviderBundleTrackerCustomizer implements BundleTrackerCustomizer {
     private static final String METAINF_SERVICES = "META-INF/services";
-    
+
     final BaseActivator activator;
     final Bundle spiBundle;
 
-    public ProviderBundleTrackerCustomizer(BaseActivator a, Bundle b) {
-        activator = a;
-        spiBundle = b;
-                
-        // TODO handle pre-existing bundles.
+    public ProviderBundleTrackerCustomizer(BaseActivator activator, Bundle spiBundle) {
+        this.activator = activator;
+        this.spiBundle = spiBundle;
     }
 
     public List<ServiceRegistration> addingBundle(Bundle bundle, BundleEvent event)
{
@@ -76,29 +74,29 @@ public class ProviderBundleTrackerCustom
         URL servicesDir = bundle.getResource("/" + METAINF_SERVICES);
         if (servicesDir == null)
             return null;
-        
+
         List<URL> serviceFiles = new ArrayList<URL>();
-        
+
         @SuppressWarnings("unchecked")
         Enumeration<URL> entries = bundle.findEntries(METAINF_SERVICES, "*", false);
         if (entries != null) {
             serviceFiles.addAll(Collections.list(entries));
         }
-        
+
         Object bcp = bundle.getHeaders().get(Constants.BUNDLE_CLASSPATH);
         if (bcp instanceof String) {
             for (String entry : ((String) bcp).split(",")) {
                 entry = entry.trim();
-                if (entry.equals(".")) 
+                if (entry.equals("."))
                     continue;
-                
+
                 URL url = bundle.getResource(entry);
                 if (url != null) {
                     serviceFiles.addAll(getMetaInfServiceURLsFromJar(url));
                 }
             }
         }
-        
+
         List<ServiceRegistration> registrations = new ArrayList<ServiceRegistration>();
         for (URL serviceFile : serviceFiles) {
             log(LogService.LOG_INFO, "Found SPI resource: " + serviceFile);
@@ -106,35 +104,35 @@ public class ProviderBundleTrackerCustom
             try {
                 BufferedReader reader = new BufferedReader(
                         new InputStreamReader(serviceFile.openStream()));
-                String className = reader.readLine();
-                // TODO need to read more than one class name!
-
-                Class<?> cls = bundle.loadClass(className);
-                Object o = cls.newInstance();
-                log(LogService.LOG_INFO, "Instantiated SPI provider: " + o);
-
-                Hashtable<String, Object> props = new Hashtable<String, Object>();
-                props.put(SpiFlyConstants.SPI_PROVIDER_URL, serviceFile);
-
-                String s = serviceFile.toExternalForm();
-                int idx = s.lastIndexOf('/');
-                String registrationClassName = className;
-                if (s.length() > idx) {
-                    registrationClassName = s.substring(idx + 1);
-                }
+                String className = null;
+                while((className = reader.readLine()) != null) {
+                    Class<?> cls = bundle.loadClass(className);
+                    Object o = cls.newInstance();
+                    log(LogService.LOG_INFO, "Instantiated SPI provider: " + o);
+
+                    Hashtable<String, Object> props = new Hashtable<String, Object>();
+                    props.put(SpiFlyConstants.SPI_PROVIDER_URL, serviceFile);
+
+                    String s = serviceFile.toExternalForm();
+                    int idx = s.lastIndexOf('/');
+                    String registrationClassName = className;
+                    if (s.length() > idx) {
+                        registrationClassName = s.substring(idx + 1);
+                    }
 
-                ServiceRegistration reg = bundle.getBundleContext()
-                        .registerService(registrationClassName, o, props);
-                registrations.add(reg);
+                    ServiceRegistration reg = bundle.getBundleContext()
+                            .registerService(registrationClassName, o, props);
+                    registrations.add(reg);
 
-                activator.registerProviderBundle(registrationClassName, bundle);
-                log(LogService.LOG_INFO, "Registered service: " + reg);                
+                    activator.registerProviderBundle(registrationClassName, bundle);
+                    log(LogService.LOG_INFO, "Registered service: " + reg);
+                }
             } catch (Exception e) {
                 log(LogService.LOG_WARNING,
                         "Could not load SPI implementation referred from " + serviceFile,
e);
             }
         }
-        
+
         return registrations;
     }
 
@@ -144,11 +142,11 @@ public class ProviderBundleTrackerCustom
             JarInputStream jis = null;
             try {
                 jis = new JarInputStream(url.openStream());
-                
+
                 JarEntry je = null;
                 while((je = jis.getNextJarEntry()) != null) {
                     if (je.getName().startsWith(METAINF_SERVICES) &&
-                        je.getName().length() > (METAINF_SERVICES.length() + 1)) {   
                   
+                        je.getName().length() > (METAINF_SERVICES.length() + 1)) {
                         urls.add(new URL("jar:" + url + "!/" + je.getName()));
                     }
                 }
@@ -171,10 +169,10 @@ public class ProviderBundleTrackerCustom
     public void removedBundle(Bundle bundle, BundleEvent event, Object registrations) {
         if (registrations == null)
             return;
-        
+
         for (ServiceRegistration reg : (List<ServiceRegistration>) registrations) {
             reg.unregister();
-            log(LogService.LOG_INFO, "Unregistered: " + reg);            
+            log(LogService.LOG_INFO, "Unregistered: " + reg);
         }
     }
 

Modified: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java?rev=1125437&r1=1125436&r2=1125437&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
(original)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
Fri May 20 15:43:33 2011
@@ -20,9 +20,11 @@ package org.apache.aries.spifly;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 
 import java.net.URL;
+import java.net.URLClassLoader;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Dictionary;
@@ -31,72 +33,174 @@ import java.util.List;
 
 import org.apache.aries.spifly.api.SpiFlyConstants;
 import org.apache.aries.spifly.impl1.MySPIImpl1;
+import org.apache.aries.spifly.impl2.MySPIImpl2a;
+import org.apache.aries.spifly.impl2.MySPIImpl2b;
+import org.apache.aries.spifly.impl3.MySPIImpl3;
 import org.easymock.EasyMock;
 import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
 
 public class ProviderBundleTrackerCustomizerTest {
     @Test
-    @SuppressWarnings("unchecked")
     public void testAddingRemovedBundle() throws Exception {
         Bundle spiBundle = EasyMock.createMock(Bundle.class);
         EasyMock.replay(spiBundle);
-        BaseActivator a = new BaseActivator() {
+        BaseActivator activator = new BaseActivator() {
             @Override
             public void start(BundleContext context) throws Exception {}
         };
 
-        ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(a,
spiBundle);
+        ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(activator,
spiBundle);
 
         ServiceRegistration sreg = EasyMock.createMock(ServiceRegistration.class);
         sreg.unregister();
         EasyMock.expectLastCall();
         EasyMock.replay(sreg);
 
-        // The bundle context for the test SPI bundle
+        BundleContext implBC = mockSPIBundleContext(sreg);
+        Bundle implBundle = mockSPIBundle(implBC);
+
+        assertEquals("Precondition", 0, activator.findProviderBundles("org.apache.aries.mytest.MySPI").size());
+        // Call addingBundle();
+        List<ServiceRegistration> registrations = customizer.addingBundle(implBundle,
null);
+        Collection<Bundle> bundles = activator.findProviderBundles("org.apache.aries.mytest.MySPI");
+        assertEquals(1, bundles.size());
+        assertSame(implBundle, bundles.iterator().next());
+
+        // The bc.registerService() call should now have been made
+        EasyMock.verify(implBC);
+
+        // Call removedBundle();
+        customizer.removedBundle(implBundle, null, registrations);
+        // sreg.unregister() should have been called.
+        EasyMock.verify(sreg);
+    }
+
+    @Test
+    public void testAddingBundleSPIBundle() throws Exception {
+        BundleContext implBC = mockSPIBundleContext(EasyMock.createNiceMock(ServiceRegistration.class));
+        Bundle spiBundle = mockSPIBundle(implBC);
+
+        ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(EasyMock.createNiceMock(BaseActivator.class),
spiBundle);
+        assertNull("The SpiFly bundle itself should be ignored", customizer.addingBundle(spiBundle,
null));
+    }
+
+    @Test
+    public void testAddingNonOptInBundle() throws Exception {
+        BundleContext implBC = mockSPIBundleContext(EasyMock.createNiceMock(ServiceRegistration.class));
+        Bundle implBundle = mockSPIBundle(implBC, null);
+
+        ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(EasyMock.createNiceMock(BaseActivator.class),
null);
+        assertNull("Bundle doesn't opt-in so should be ignored", customizer.addingBundle(implBundle,
null));
+    }
+
+    @Test
+    @SuppressWarnings("unchecked")
+    public void testAddingBundleWithBundleClassPath() throws Exception {
+        Bundle spiBundle = EasyMock.createMock(Bundle.class);
+        EasyMock.replay(spiBundle);
+        BaseActivator activator = new BaseActivator() {
+            @Override
+            public void start(BundleContext context) throws Exception {}
+        };
+
+        ProviderBundleTrackerCustomizer customizer = new ProviderBundleTrackerCustomizer(activator,
spiBundle);
+
         BundleContext implBC = EasyMock.createMock(BundleContext.class);
         EasyMock.<Object>expect(implBC.registerService(
                 EasyMock.eq("org.apache.aries.mytest.MySPI"),
-                EasyMock.isA(MySPIImpl1.class),
-                (Dictionary<String,?>) EasyMock.anyObject())).andReturn(sreg);
+                EasyMock.isA(MySPIImpl2a.class),
+                (Dictionary<String,?>) EasyMock.anyObject())).andReturn(EasyMock.createNiceMock(ServiceRegistration.class));
+        EasyMock.<Object>expect(implBC.registerService(
+                EasyMock.eq("org.apache.aries.mytest.MySPI"),
+                EasyMock.isA(MySPIImpl2b.class),
+                (Dictionary<String,?>) EasyMock.anyObject())).andReturn(EasyMock.createNiceMock(ServiceRegistration.class));
+        EasyMock.<Object>expect(implBC.registerService(
+                EasyMock.eq("org.apache.aries.mytest.MySPI"),
+                EasyMock.isA(MySPIImpl3.class),
+                (Dictionary<String,?>) EasyMock.anyObject())).andReturn(EasyMock.createNiceMock(ServiceRegistration.class));
         EasyMock.replay(implBC);
 
-        // The test impl bundle
+
         Bundle implBundle = EasyMock.createNiceMock(Bundle.class);
-        EasyMock.expect(implBundle.getBundleContext()).andReturn(implBC);
+        EasyMock.expect(implBundle.getBundleContext()).andReturn(implBC).anyTimes();
 
         Dictionary<String, String> headers = new Hashtable<String, String>();
-        // Specify the headers for the test bundle
         headers.put(SpiFlyConstants.SPI_PROVIDER_HEADER, "*");
+        headers.put(Constants.BUNDLE_CLASSPATH, ".,non-jar.jar,embedded.jar,embedded2.jar");
         EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
 
-        // List the resources found at META-INF/services in the test bundle
-        URL dir = getClass().getResource("impl1/META-INF/services");
+        URL embeddedJar = getClass().getResource("/embedded.jar");
+        assertNotNull("precondition", embeddedJar);
+        EasyMock.expect(implBundle.getResource("embedded.jar")).andReturn(embeddedJar).anyTimes();
+        URL embedded2Jar = getClass().getResource("/embedded2.jar");
+        assertNotNull("precondition", embedded2Jar);
+        EasyMock.expect(implBundle.getResource("embedded2.jar")).andReturn(embedded2Jar).anyTimes();
+        URL dir = new URL("jar:" + embeddedJar + "!/META-INF/services");
         assertNotNull("precondition", dir);
         EasyMock.expect(implBundle.getResource("/META-INF/services")).andReturn(dir).anyTimes();
-        URL res = getClass().getResource("impl1/META-INF/services/org.apache.aries.mytest.MySPI");
-        assertNotNull("precondition", res);
-        EasyMock.expect(implBundle.findEntries("META-INF/services", "*", false)).andReturn(
-                Collections.enumeration(Collections.singleton(res))).anyTimes();
-        Class<?> cls = getClass().getClassLoader().loadClass("org.apache.aries.spifly.impl1.MySPIImpl1");
-        EasyMock.<Object> expect(implBundle.loadClass("org.apache.aries.spifly.impl1.MySPIImpl1")).andReturn(cls).anyTimes();
+        EasyMock.expect(implBundle.findEntries((String) EasyMock.anyObject(), (String) EasyMock.anyObject(),
EasyMock.anyBoolean())).
+            andReturn(null).anyTimes();
+
+        ClassLoader cl = new URLClassLoader(new URL [] {embeddedJar}, getClass().getClassLoader());
+        Class<?> clsA = cl.loadClass("org.apache.aries.spifly.impl2.MySPIImpl2a");
+        EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl2.MySPIImpl2a")).andReturn(clsA).anyTimes();
+        Class<?> clsB = cl.loadClass("org.apache.aries.spifly.impl2.MySPIImpl2b");
+        EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl2.MySPIImpl2b")).andReturn(clsB).anyTimes();
+        ClassLoader cl2 = new URLClassLoader(new URL [] {embedded2Jar}, getClass().getClassLoader());
+        Class<?> clsC = cl2.loadClass("org.apache.aries.spifly.impl3.MySPIImpl3");
+        EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl3.MySPIImpl3")).andReturn(clsC).anyTimes();
         EasyMock.replay(implBundle);
 
-        assertEquals("Precondition", 0, a.findProviderBundles("org.apache.aries.mytest.MySPI").size());
+        assertEquals("Precondition", 0, activator.findProviderBundles("org.apache.aries.mytest.MySPI").size());
         // Call addingBundle();
         List<ServiceRegistration> registrations = customizer.addingBundle(implBundle,
null);
-        Collection<Bundle> bundles = a.findProviderBundles("org.apache.aries.mytest.MySPI");
+        Collection<Bundle> bundles = activator.findProviderBundles("org.apache.aries.mytest.MySPI");
         assertEquals(1, bundles.size());
         assertSame(implBundle, bundles.iterator().next());
 
         // The bc.registerService() call should now have been made
         EasyMock.verify(implBC);
+    }
 
-        // Call removedBundle();
-        customizer.removedBundle(implBundle, null, registrations);
-        // sreg.unregister() should have been called.
-        EasyMock.verify(sreg);
+    @SuppressWarnings("unchecked")
+    private BundleContext mockSPIBundleContext(ServiceRegistration sreg) {
+        BundleContext implBC = EasyMock.createMock(BundleContext.class);
+        EasyMock.<Object>expect(implBC.registerService(
+                EasyMock.eq("org.apache.aries.mytest.MySPI"),
+                EasyMock.isA(MySPIImpl1.class),
+                (Dictionary<String,?>) EasyMock.anyObject())).andReturn(sreg);
+        EasyMock.replay(implBC);
+        return implBC;
+    }
+
+    private Bundle mockSPIBundle(BundleContext implBC) throws ClassNotFoundException {
+        return mockSPIBundle(implBC, "*");
+    }
+
+    private Bundle mockSPIBundle(BundleContext implBC, String spiProviderHeader) throws ClassNotFoundException
{
+        Bundle implBundle = EasyMock.createNiceMock(Bundle.class);
+        EasyMock.expect(implBundle.getBundleContext()).andReturn(implBC).anyTimes();
+
+        Dictionary<String, String> headers = new Hashtable<String, String>();
+        if (spiProviderHeader != null)
+            headers.put(SpiFlyConstants.SPI_PROVIDER_HEADER, spiProviderHeader);
+        EasyMock.expect(implBundle.getHeaders()).andReturn(headers).anyTimes();
+
+        // List the resources found at META-INF/services in the test bundle
+        URL dir = getClass().getResource("impl1/META-INF/services");
+        assertNotNull("precondition", dir);
+        EasyMock.expect(implBundle.getResource("/META-INF/services")).andReturn(dir).anyTimes();
+        URL res = getClass().getResource("impl1/META-INF/services/org.apache.aries.mytest.MySPI");
+        assertNotNull("precondition", res);
+        EasyMock.expect(implBundle.findEntries("META-INF/services", "*", false)).andReturn(
+                Collections.enumeration(Collections.singleton(res))).anyTimes();
+        Class<?> cls = getClass().getClassLoader().loadClass("org.apache.aries.spifly.impl1.MySPIImpl1");
+        EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl1.MySPIImpl1")).andReturn(cls).anyTimes();
+        EasyMock.replay(implBundle);
+        return implBundle;
     }
 }

Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2a.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2a.java?rev=1125437&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2a.java
(added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2a.java
Fri May 20 15:43:33 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.aries.spifly.impl2;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl2a implements MySPI {
+    @Override
+    public String someMethod(String s) {
+        return "" + s.length();
+    }
+}

Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2b.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2b.java?rev=1125437&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2b.java
(added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl2/MySPIImpl2b.java
Fri May 20 15:43:33 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.aries.spifly.impl2;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl2b implements MySPI {
+    @Override
+    public String someMethod(String s) {
+        return "-" + s.length();
+    }
+}

Added: aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl3/MySPIImpl3.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl3/MySPIImpl3.java?rev=1125437&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl3/MySPIImpl3.java
(added)
+++ aries/trunk/spi-fly/spi-fly-core/src/test/java/org/apache/aries/spifly/impl3/MySPIImpl3.java
Fri May 20 15:43:33 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.aries.spifly.impl3;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl3 implements MySPI {
+    @Override
+    public String someMethod(String s) {
+        return "impl3";
+    }
+}

Added: aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded.jar
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded.jar?rev=1125437&view=auto
==============================================================================
Binary file - no diff available.

Propchange: aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded2.jar
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded2.jar?rev=1125437&view=auto
==============================================================================
Binary file - no diff available.

Propchange: aries/trunk/spi-fly/spi-fly-core/src/test/resources/embedded2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message