diff options
Diffstat (limited to 'branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java')
-rw-r--r-- | branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java b/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java index e0a8ac2c42..1477554cd1 100644 --- a/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java +++ b/branches/sca-equinox/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java @@ -24,8 +24,6 @@ import java.io.StringReader; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; -import junit.framework.TestCase; - import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; @@ -36,11 +34,14 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; /** * @version $Rev$ $Date$ */ -public class AtomBindingProcessorTestCase extends TestCase { +public class AtomBindingProcessorTestCase { private static final String COMPOSITE = "<?xml version=\"1.0\" encoding=\"ASCII\"?>" @@ -53,12 +54,12 @@ public class AtomBindingProcessorTestCase extends TestCase { + " </component>" + "</composite>"; - private XMLInputFactory inputFactory; - private StAXArtifactProcessor<Object> staxProcessor; - private Monitor monitor; + private static XMLInputFactory inputFactory; + private static StAXArtifactProcessor<Object> staxProcessor; + private static Monitor monitor; - @Override - protected void setUp() throws Exception { + @BeforeClass + public static void setUp() throws Exception { DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); inputFactory = XMLInputFactory.newInstance(); // Create a monitor @@ -76,14 +77,15 @@ public class AtomBindingProcessorTestCase extends TestCase { * Test parsing valid composite definition. Valid composite populated with correct values expected. * @throws Exception */ + @Test public void testLoadValidComposite() throws Exception { XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE)); Composite composite = (Composite)staxProcessor.read(reader); AtomBinding binding = (AtomBinding) composite.getComponents().get(0).getServices().get(0).getBindings().get(0); - assertNotNull(binding); - assertEquals("Feed Title", binding.getTitle()); - assertEquals("http://localhost:8080/feed", binding.getURI()); + Assert.assertNotNull(binding); + Assert.assertEquals("Feed Title", binding.getTitle()); + Assert.assertEquals("http://localhost:8080/feed", binding.getURI()); } } |