diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-08 04:37:06 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-08 04:37:06 +0000 |
commit | 9e88e074f0bb06c01811bc0d4304b8b0e5fd5ade (patch) | |
tree | 1884791dd6386f890c47066aa340025efd32a0c9 /java/sca/modules/binding-ws-wsdlgen/src | |
parent | b9b2c118598f00caa4ca6846480180619fa51147 (diff) |
Fix test cases to avoid NPE
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@802296 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-ws-wsdlgen/src')
2 files changed, 5 insertions, 3 deletions
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java index dafa1497a8..6e3538c47b 100644 --- a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java +++ b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java @@ -24,6 +24,7 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor; import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; @@ -47,14 +48,15 @@ import org.oasisopen.sca.annotation.Remotable; public class BindingWSDLGeneratorTestCase extends TestCase { public void testCreateWSDLInterfaceContract() throws InvalidInterfaceException { - org.apache.tuscany.sca.core.FactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry()); + ExtensionPointRegistry registry = new DefaultExtensionPointRegistry(); + org.apache.tuscany.sca.core.FactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(registry); WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class); XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class); DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class); JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory(); JavaInterfaceContract javaIC = factory.createJavaInterfaceContract(); JavaInterface iface = factory.createJavaInterface(HelloWorld.class); - DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(); + DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(registry); JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null); new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface); new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface); diff --git a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java index a55bf6de8a..cb866f69a0 100644 --- a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java +++ b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java @@ -51,7 +51,7 @@ public class Interface2WSDLGeneratorTestCase { public void testGenerate() throws Exception { JavaInterfaceFactory iFactory = new DefaultJavaInterfaceFactory(); JavaInterface iface = iFactory.createJavaInterface(TestJavaInterface.class); - DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(); + DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(new DefaultExtensionPointRegistry()); JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null); new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface); new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface); |