You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by da...@apache.org on 2011/03/02 15:52:55 UTC
svn commit: r1076235 -
/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFlyTests/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
Author: davidb
Date: Wed Mar 2 14:52:54 2011
New Revision: 1076235
URL: http://svn.apache.org/viewvc?rev=1076235&view=rev
Log:
Fix for unit test.
Note this test is not yet part of the overall build as it's currently accompanying experimental code in the spi-fly/contrib directory.
Modified:
aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFlyTests/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
Modified: aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFlyTests/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFlyTests/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java?rev=1076235&r1=1076234&r2=1076235&view=diff
==============================================================================
--- aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFlyTests/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java (original)
+++ aries/trunk/spi-fly/contrib/pilot_using_weavinghook/SpiFlyTests/src/org/apache/aries/spifly/ProviderBundleTrackerCustomizerTest.java Wed Mar 2 14:52:54 2011
@@ -26,6 +26,7 @@ import java.util.Hashtable;
import java.util.List;
import org.apache.aries.spifly.api.SpiFlyConstants;
+import org.apache.aries.spifly.impl1.MySPIImpl1;
import org.easymock.EasyMock;
import org.junit.Assert;
import org.junit.Test;
@@ -52,7 +53,7 @@ public class ProviderBundleTrackerCustom
BundleContext implBC = EasyMock.createMock(BundleContext.class);
EasyMock.<Object>expect(implBC.registerService(
EasyMock.eq("org.apache.aries.mytest.MySPI"),
- EasyMock.isA(MySPIImpl.class),
+ EasyMock.isA(MySPIImpl1.class),
(Dictionary<String,?>) EasyMock.anyObject())).andReturn(sreg);
EasyMock.replay(implBC);
@@ -66,13 +67,13 @@ public class ProviderBundleTrackerCustom
EasyMock.expect(implBundle.getHeaders()).andReturn(headers);
// List the resources found at META-INF/services in the test bundle
- URL res = getClass().getResource("org.apache.aries.mytest.MySPI");
+ URL res = getClass().getResource("impl1/META-INF/services/org.apache.aries.mytest.MySPI");
Assert.assertNotNull("precondition", res);
EasyMock.expect(implBundle.findEntries("META-INF/services", "*", false)).andReturn(
Collections.enumeration(Collections.singleton(res)));
- Class<?> cls = getClass().getClassLoader().loadClass("org.apache.aries.spifly.MySPIImpl");
- EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.MySPIImpl")).andReturn(cls);
+ Class<?> cls = getClass().getClassLoader().loadClass("org.apache.aries.spifly.impl1.MySPIImpl1");
+ EasyMock.<Object>expect(implBundle.loadClass("org.apache.aries.spifly.impl1.MySPIImpl1")).andReturn(cls);
EasyMock.replay(implBundle);