tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r713623 - in /tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml: AbstractWSDLTestCase.java WSDLDocumentProcessorTestCase.java
Date Thu, 13 Nov 2008 03:27:28 GMT
Author: rfeng
Date: Wed Nov 12 19:27:28 2008
New Revision: 713623

URL: http://svn.apache.org/viewvc?rev=713623&view=rev
Log:
Add the missing AbstractWSDLTestCase

Added:
    tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
  (with props)
Modified:
    tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java

Added: tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java?rev=713623&view=auto
==============================================================================
--- tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
(added)
+++ tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
Wed Nov 12 19:27:28 2008
@@ -0,0 +1,69 @@
+/*
+ * 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.xml;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.ContributionFactory;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+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.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.xsd.XSDFactory;
+
+/**
+ * Test case for WSDLOperation.
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractWSDLTestCase extends TestCase {
+    protected URLArtifactProcessor<Object> documentProcessor;
+    protected ModelResolver resolver;
+    protected WSDLFactory wsdlFactory;
+    protected XSDFactory xsdFactory;
+
+    /**
+     * @see junit.framework.TestCase#setUp()
+     */
+    @Override
+    protected void setUp() throws Exception {
+        ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+        wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
+        xsdFactory = modelFactories.getFactory(XSDFactory.class);
+        
+        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
+        Contribution contribution = contributionFactory.createContribution();
+        ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
+        resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
+        contribution.setModelResolver(resolver);
+        
+        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
+    }
+
+}

Propchange: tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java?rev=713623&r1=713622&r2=713623&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
(original)
+++ tuscany/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessorTestCase.java
Wed Nov 12 19:27:28 2008
@@ -28,7 +28,6 @@
 
 import junit.framework.Assert;
 
-import org.apache.tuscany.sca.interfacedef.wsdl.AbstractWSDLTestCase;
 import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
 import org.junit.After;
 import org.junit.Before;



Mime
View raw message