summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/assembly/src/test
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-10 18:51:20 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-10 18:51:20 +0000
commit1feee03e177b77d9c5d96a07ca95b2e3049471af (patch)
tree0c5aa74f31ca4b3e5ff84887ed7cc40de9ac1fb6 /branches/sca-equinox/modules/assembly/src/test
parent612615c4efe2748c3d97d1dca61567ea57c6d5a2 (diff)
Convert the test cases to JUNIT 4
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/assembly/src/test')
-rw-r--r--branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java15
-rw-r--r--branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java16
2 files changed, 20 insertions, 11 deletions
diff --git a/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java b/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java
index 8a3a89aba4..e73119204d 100644
--- a/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java
+++ b/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java
@@ -20,7 +20,8 @@ package org.apache.tuscany.sca.assembly;
import javax.xml.namespace.QName;
-import junit.framework.TestCase;
+import org.junit.BeforeClass;
+import org.junit.Test;
/**
@@ -28,27 +29,31 @@ import junit.framework.TestCase;
*
* @version $Rev$ $Date$
*/
-public class AssemblyFactoryTestCase extends TestCase {
+public class AssemblyFactoryTestCase {
- private AssemblyFactory assemblyFactory;
+ private static AssemblyFactory assemblyFactory;
- @Override
- public void setUp() throws Exception {
+ @BeforeClass
+ public static void setUp() throws Exception {
assemblyFactory = new DefaultAssemblyFactory();
}
+ @Test
public void testCreateComponent() {
createComponent("AccountServiceComponent1");
}
+ @Test
public void testCreateComponentType() {
createComponentType();
}
+ @Test
public void testCreateComposite() {
createComposite();
}
+ @Test
public void testCreateConstrainingType() {
createConstrainingType();
}
diff --git a/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java b/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java
index 5d7fff41af..faad1736ac 100644
--- a/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java
+++ b/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java
@@ -19,9 +19,9 @@
package org.apache.tuscany.sca.assembly.builder.impl;
-import javax.xml.namespace.QName;
+import static junit.framework.Assert.assertTrue;
-import junit.framework.TestCase;
+import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Component;
@@ -29,21 +29,24 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeReference;
import org.apache.tuscany.sca.assembly.CompositeService;
import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
+import org.junit.BeforeClass;
+import org.junit.Test;
/**
* Test the CompositeBuilder.
*
* @version $Rev$ $Date$
*/
-public class CompositeBuilderTestCase extends TestCase {
+public class CompositeBuilderTestCase {
- private AssemblyFactory assemblyFactory;
+ private static AssemblyFactory assemblyFactory;
- @Override
- protected void setUp() throws Exception {
+ @BeforeClass
+ public static void setUp() throws Exception {
assemblyFactory = new DefaultAssemblyFactory();
}
+ @Test
public void testFuseIncludes() throws Exception {
Composite c1 = assemblyFactory.createComposite();
c1.setName(new QName("http://foo", "C1"));
@@ -76,6 +79,7 @@ public class CompositeBuilderTestCase extends TestCase {
assertTrue(c.getReferences().get(0).getName().equals("r"));
}
+ @Test
public void testExpandComposites() throws Exception {
Composite c1 = assemblyFactory.createComposite();
c1.setName(new QName("http://foo", "C1"));