diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-18 20:10:05 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-18 20:10:05 +0000 |
commit | bd0de2fd94cee619b4fc05ff3b9267e084184f01 (patch) | |
tree | 5163fba97d8d114ca87f20db432368fc8ed44c04 /branches/sca-equinox/modules/core/src | |
parent | 146d6718330958411e6b7709e3da9fcab106b576 (diff) |
Convert two more test cases into JUNIT 4
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@718700 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/core/src')
-rw-r--r-- | branches/sca-equinox/modules/core/src/test/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistryTestCase.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/branches/sca-equinox/modules/core/src/test/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistryTestCase.java b/branches/sca-equinox/modules/core/src/test/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistryTestCase.java index 7b44736d4b..d3e31eb570 100644 --- a/branches/sca-equinox/modules/core/src/test/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistryTestCase.java +++ b/branches/sca-equinox/modules/core/src/test/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistryTestCase.java @@ -19,30 +19,34 @@ package org.apache.tuscany.sca.core; -import junit.framework.TestCase; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; -public class DefaultExtensionPointRegistryTestCase extends TestCase { +import org.junit.Before; +import org.junit.Test; + +public class DefaultExtensionPointRegistryTestCase { private ExtensionPointRegistry registry; - @Override - protected void setUp() throws Exception { - super.setUp(); + @Before + public void setUp() throws Exception { registry = new DefaultExtensionPointRegistry(); } + @Test public void testRegistry() { - MyRegistry service = new MyREgistryImpl(); + MyExtensionPoint service = new MyExtensionPointImpl(); registry.addExtensionPoint(service); - assertSame(service, registry.getExtensionPoint(MyRegistry.class)); + assertSame(service, registry.getExtensionPoint(MyExtensionPoint.class)); registry.removeExtensionPoint(service); - assertNull(registry.getExtensionPoint(MyRegistry.class)); + assertNull(registry.getExtensionPoint(MyExtensionPoint.class)); } - public static interface MyRegistry { + public static interface MyExtensionPoint { void doSomething(); } - private static class MyREgistryImpl implements MyRegistry { + private static class MyExtensionPointImpl implements MyExtensionPoint { public void doSomething() { } |