summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authormcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2008-12-03 15:14:58 +0000
committermcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2008-12-03 15:14:58 +0000
commite4593758eee048b1a6384c864cd6b420b99657e9 (patch)
tree35b4db1c6383988a40d5d745a83b9482cececc9e /java/sca
parent4aa9ea73c7b50254d01cafb82fe91e50f5da933b (diff)
Converted unit tests from JUnit 3 to JUnit 4
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@722927 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java b/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
index 39964c297d..72235812a1 100644
--- a/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
+++ b/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
@@ -20,6 +20,11 @@
package org.apache.tuscany.sca.policy.xml;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import java.io.InputStream;
import java.net.URL;
@@ -32,8 +37,6 @@ import javax.xml.namespace.QName;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
-import junit.framework.TestCase;
-
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -51,13 +54,15 @@ import org.apache.tuscany.sca.policy.ProfileIntent;
import org.apache.tuscany.sca.policy.QualifiedIntent;
import org.apache.tuscany.sca.policy.impl.BindingTypeImpl;
import org.apache.tuscany.sca.policy.impl.ImplementationTypeImpl;
+import org.junit.Before;
+import org.junit.Test;
/**
* Test reading SCA XML assembly documents.
*
* @version $Rev: 551296 $ $Date: 2007-06-28 01:18:35 +0530 (Thu, 28 Jun 2007) $
*/
-public class ReadDocumentTestCase extends TestCase {
+public class ReadDocumentTestCase {
private ModelResolver resolver;
private StAXArtifactProcessor<Object> staxProcessor;
@@ -84,7 +89,7 @@ public class ReadDocumentTestCase extends TestCase {
private static final QName wsBinding = new QName(scaNamespace, "binding.ws");
private static final QName javaImpl = new QName(scaNamespace, "implementation.java");
- @Override
+ @Before
public void setUp() throws Exception {
DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
resolver = new DefaultModelResolver();
@@ -156,10 +161,7 @@ public class ReadDocumentTestCase extends TestCase {
urlStream.close();
}
- @Override
- public void tearDown() throws Exception {
- }
-
+ @Test
public void testReadSCADefinitions() throws Exception {
assertNotNull(intentTable.get(confidentiality));
assertNotNull(intentTable.get(messageProtection));
@@ -179,6 +181,7 @@ public class ReadDocumentTestCase extends TestCase {
assertNotNull(implTypesTable.get(javaImpl));
}
+ @Test
public void testResolution() throws Exception {
assertTrue(intentTable.get(messageProtection) instanceof ProfileIntent);
ProfileIntent profileIntent = (ProfileIntent)intentTable.get(new QName(namespace, "messageProtection"));