summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-1.0.1/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.0.1/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java')
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
new file mode 100644
index 0000000000..5aa28409ea
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.interfacedef.wsdl;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.impl.ContributionImpl;
+import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolverExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
+import org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLDocumentProcessor;
+import org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver;
+import org.apache.tuscany.sca.interfacedef.wsdl.xml.XSDModelResolver;
+
+/**
+ * Test case for WSDLOperation
+ */
+public abstract class AbstractWSDLTestCase extends TestCase {
+ protected WSDLDocumentProcessor processor;
+ protected ModelResolver resolver;
+ protected WSDLFactory wsdlFactory;
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ Contribution contribution = new ContributionImpl() {
+ };
+ ModelResolverExtensionPoint modelResolvers = new DefaultModelResolverExtensionPoint();
+ ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
+ wsdlFactory = new DefaultWSDLFactory();
+ factories.addFactory(wsdlFactory);
+ javax.wsdl.factory.WSDLFactory wsdl4jFactory = javax.wsdl.factory.WSDLFactory.newInstance();
+ factories.addFactory(wsdlFactory);
+ factories.addFactory(wsdl4jFactory);
+ resolver = new ExtensibleModelResolver(contribution, modelResolvers, factories);
+ contribution.setModelResolver(resolver);
+ modelResolvers.addResolver(WSDLDefinition.class, WSDLModelResolver.class);
+ modelResolvers.addResolver(XSDefinition.class, XSDModelResolver.class);
+
+ processor = new WSDLDocumentProcessor(factories);
+ }
+
+}