diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-20 16:46:55 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-20 16:46:55 +0000 |
commit | b099739d69690535623b126b37f47bfdfecf040f (patch) | |
tree | 252ab5e26d6e6f2c804c43744ff22d68ce3b353f /java/sca/modules/extensibility/src/test | |
parent | f1863df3c7da7a4632ef3ca70d430d62ed387bad (diff) |
Refactoring a few methods on the ServiceDiscover
Adding an OSGi service registry based ExtensionPointRegistry implementation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776759 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/extensibility/src/test')
-rw-r--r-- | java/sca/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/java/sca/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java b/java/sca/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java index cfab64bef7..c0aac21596 100644 --- a/java/sca/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java +++ b/java/sca/modules/extensibility/src/test/java/org/apache/tuscany/sca/extensibility/ContextClassLoaderServiceDiscovererTestCase.java @@ -6,21 +6,21 @@ * 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. + * under the License. */ package org.apache.tuscany.sca.extensibility; import java.io.IOException; -import java.util.Set; +import java.util.Collection; import org.junit.AfterClass; import org.junit.Assert; @@ -43,26 +43,26 @@ public class ContextClassLoaderServiceDiscovererTestCase { @Test public void testDiscovery() { - Set<ServiceDeclaration> discriptors = + Collection<ServiceDeclaration> discriptors = discover.getServiceDeclarations("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint"); Assert.assertEquals(1, discriptors.size()); discriptors = discover.getServiceDeclarations("notthere"); Assert.assertEquals(0, discriptors.size()); } - + @Test public void testDiscoveryFirst() throws IOException { ServiceDeclaration descriptor = - discover.getFirstServiceDeclaration("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint"); + discover.getServiceDeclaration("org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint"); Assert.assertNotNull(descriptor); - descriptor = discover.getFirstServiceDeclaration("notthere"); + descriptor = discover.getServiceDeclaration("notthere"); Assert.assertNull(descriptor); } - + @Test public void testXPathFactory() { - Set<ServiceDeclaration> discriptors = discover.getServiceDeclarations("javax.xml.xpath.XPathFactory"); + Collection<ServiceDeclaration> discriptors = discover.getServiceDeclarations("javax.xml.xpath.XPathFactory"); if (!discriptors.isEmpty()) { ServiceDeclaration d = discriptors.iterator().next(); Assert.assertNotNull(d.getClassName()); |