summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-01-17 01:22:03 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-01-17 01:22:03 +0000
commitcbb14b9965208792bdba2f313bc57951c90c1a12 (patch)
treeb5d11863eef35be42d466242445cf7f53dd1f54a /branches/sca-java-1.x/modules
parent3e44e682a261fda5b6880570b6a928af50766dc3 (diff)
Updating testcase to JUnit 4
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@735196 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules')
-rw-r--r--branches/sca-java-1.x/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java b/branches/sca-java-1.x/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java
index 5777a33277..32a3878db3 100644
--- a/branches/sca-java-1.x/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java
+++ b/branches/sca-java-1.x/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java
@@ -19,6 +19,9 @@
package org.apache.tuscany.sca.assembly.xml;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
@@ -27,22 +30,22 @@ import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamReader;
-import junit.framework.TestCase;
-
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
/**
* Test reading SCA XML assemblies.
*
* @version $Rev$ $Date$
*/
-public class ReadWriteAnyAttributeTestCase extends TestCase {
+public class ReadWriteAnyAttributeTestCase {
private XMLInputFactory inputFactory;
private ExtensibleStAXArtifactProcessor staxProcessor;
@@ -77,7 +80,7 @@ public class ReadWriteAnyAttributeTestCase extends TestCase {
"</component>"+
"</composite>";
- @Override
+ @Before
public void setUp() throws Exception {
ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
inputFactory = XMLInputFactory.newInstance();
@@ -89,11 +92,12 @@ public class ReadWriteAnyAttributeTestCase extends TestCase {
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance(), null);
}
- @Override
+ @After
public void tearDown() throws Exception {
}
+ @Test
public void testReadComposite() throws Exception {
InputStream is = getClass().getResourceAsStream("CalculatorExtended.composite");
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
@@ -102,6 +106,7 @@ public class ReadWriteAnyAttributeTestCase extends TestCase {
is.close();
}
+ @Test
public void testWriteComposite() throws Exception {
InputStream is = getClass().getResourceAsStream("CalculatorExtended.composite");
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);