diff options
2 files changed, 16 insertions, 7 deletions
diff --git a/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/FaultBeanGeneratorTestCase.java b/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/FaultBeanGeneratorTestCase.java index 567591f166..cca25ffc74 100644 --- a/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/FaultBeanGeneratorTestCase.java +++ b/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/FaultBeanGeneratorTestCase.java @@ -27,16 +27,18 @@ import java.lang.annotation.Annotation; import javax.xml.bind.JAXBContext; import junit.framework.Assert; -import junit.framework.TestCase; import org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper; +import org.junit.Test; import org.objectweb.asm.ClassReader; import org.objectweb.asm.util.CheckClassAdapter; /** * @version $Rev$ $Date$ */ -public class FaultBeanGeneratorTestCase extends TestCase { +public class FaultBeanGeneratorTestCase { + + @Test public void testGenerate() throws IOException { byte[] content = new FaultBeanGenerator().generate(MyException.class); ClassReader cr = new ClassReader(content); @@ -44,6 +46,7 @@ public class FaultBeanGeneratorTestCase extends TestCase { CheckClassAdapter.verify(cr, false, pw); } + @Test public void testGenerateClass() throws Exception { Class<?> cls = FaultBeanGenerator.generateFaultBeanClass(MyException.class); Assert.assertEquals("org.apache.tuscany.sca.interfacedef.java.jaxws.jaxws.MyExceptionBean", cls.getName()); diff --git a/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java b/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java index 108d283584..3160965ed0 100644 --- a/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java +++ b/java/sca/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java @@ -19,13 +19,15 @@ package org.apache.tuscany.sca.interfacedef.java.jaxws; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.xml.namespace.QName; import junit.framework.Assert; -import junit.framework.TestCase; import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint; import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint; @@ -34,26 +36,29 @@ import org.apache.tuscany.sca.databinding.jaxb.XMLAdapterExtensionPoint; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; +import org.junit.Before; +import org.junit.Test; import com.example.stock.StockExceptionTest; + /** * * @version $Rev$ $Date$ */ -public class JAXWSJavaInterfaceProcessorTestCase extends TestCase { +public class JAXWSJavaInterfaceProcessorTestCase { private JAXWSJavaInterfaceProcessor interfaceProcessor; /** * @see junit.framework.TestCase#setUp() */ - @Override - protected void setUp() throws Exception { - super.setUp(); + @Before + public void setUp() throws Exception { DataBindingExtensionPoint db = new DefaultDataBindingExtensionPoint(); XMLAdapterExtensionPoint xa = new DefaultXMLAdapterExtensionPoint(); interfaceProcessor = new JAXWSJavaInterfaceProcessor(db, new JAXWSFaultExceptionMapper(db, xa), xa); } + @Test public void testWrapper() throws Exception { DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(); JavaInterface contract = iFactory.createJavaInterface(StockExceptionTest.class); @@ -69,6 +74,7 @@ public class JAXWSJavaInterfaceProcessorTestCase extends TestCase { * Test method for * {@link org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSJavaInterfaceProcessor#visitInterface(JavaInterface)}. */ + @Test public final void testProcessor() throws Exception { DefaultJavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(); JavaInterface contract = iFactory.createJavaInterface(WebServiceInterfaceWithoutAnnotation.class); |