diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-19 05:31:14 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-19 05:31:14 +0000 |
commit | 6a633dee838417ed68cf91fbd2e9b3b9fa07bd8f (patch) | |
tree | 658d78b2087d2f851518be4d27ed9d913ac47ebb /branches/sca-equinox/modules/extensibility/src/test/java | |
parent | bd126f649a92dd53cd3b3ccef5029ab273436291 (diff) |
Simplified ServiceDiscoverer. Started to use it to create factories to resolve ClassNotFoundExceptions. Renamed calculator-osgi to calculator-equinox and a few fixes to get it working in Eclipse.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/extensibility/src/test/java')
-rw-r--r-- | branches/sca-equinox/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/branches/sca-equinox/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java b/branches/sca-equinox/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java index fd508402fc..4c965420ca 100644 --- a/branches/sca-equinox/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java +++ b/branches/sca-equinox/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java @@ -19,6 +19,7 @@ package org.apache.tuscany.sca.extensibility; +import java.io.IOException; import java.util.Set; import junit.framework.Assert; @@ -44,21 +45,20 @@ public class ContextClassLoaderServiceDiscovererTestCase { @Test public void testDiscovery() { Set<ServiceDeclaration> discriptors = - discover.discover("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint", false); + discover.getServiceDeclarations("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint"); Assert.assertEquals(1, discriptors.size()); discriptors = - discover.discover("notthere", false); + discover.getServiceDeclarations("notthere"); Assert.assertEquals(0, discriptors.size()); } @Test - public void testDiscoveryFirst() { - Set<ServiceDeclaration> discriptors = - discover.discover("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint", true); - Assert.assertEquals(1, discriptors.size()); - discriptors = - discover.discover("notthere", true); - Assert.assertEquals(0, discriptors.size()); + public void testDiscoveryFirst() throws IOException { + ServiceDeclaration descriptor = + discover.getFirstServiceDeclaration("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint"); + Assert.assertNotNull(descriptor); + descriptor = discover.getFirstServiceDeclaration("notthere"); + Assert.assertNull(descriptor); } |