IZ#122543: Excessively long file paths in CVS, moving test data to the test data directory instead designer_refactoring2_before_merge editor_settings_90403_before_separation masterfs_novcs_root modresource_cache_root mutex_wrapper_root versionability_89629_base_8 winsysfx_root
authortli@netbeans.org
Mon, 26 Nov 2007 20:33:52 +0000
changeset 1434d44470e02e03
parent 1433 763c944a50a6
child 1435 a7435e2cb8e0
IZ#122543: Excessively long file paths in CVS, moving test data to the test data directory instead
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/CasaWrapperModelTest.java
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/conf/SynchronousSampleApplication.casa
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/SynchronousSample/SynchronousSample.wsdl
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/SynchronousSample/SynchronousSample.xsd
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/SynchronousSample/jbi.xml
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/sun-file-binding/jbi.xml
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/sun-http-binding/jbi.xml
compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiasa/casa.wsdl
     1.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/CasaWrapperModelTest.java	Fri Nov 23 09:42:33 2007 +0000
     1.2 +++ b/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/CasaWrapperModelTest.java	Mon Nov 26 20:33:52 2007 +0000
     1.3 @@ -11,7 +11,7 @@
     1.4  import junit.framework.*;
     1.5  import java.beans.PropertyChangeListener;
     1.6  import java.io.File;
     1.7 -import java.net.URI;
     1.8 +import java.net.URL;
     1.9  import java.util.*;
    1.10  import javax.xml.namespace.QName;
    1.11  import org.netbeans.api.project.Project;
    1.12 @@ -98,17 +98,41 @@
    1.13          super(testName);
    1.14      }
    1.15  
    1.16 +    private File getDataDir() {
    1.17 +        File dataDir = null;
    1.18 +        try {
    1.19 +            String className= CasaWrapperModelTest.class.getName();
    1.20 +            URL url = this.getClass().getResource(className.substring(className.lastIndexOf('.')+1)+".class"); // NOI18N
    1.21 +            dataDir = new File(url.getFile()).getParentFile();
    1.22 +            int index = 0;
    1.23 +            while((index = className.indexOf('.', index)+1) > 0) {
    1.24 +                dataDir = dataDir.getParentFile();
    1.25 +            }
    1.26 +            dataDir = new File(dataDir.getParentFile(), "data"); //NOI18N
    1.27 +            // System.out.println("xtest.dadDir: "+dataDir.getAbsolutePath());
    1.28 +        } catch (Exception ex) {
    1.29 +            ex.printStackTrace();
    1.30 +        }
    1.31 +        return dataDir;
    1.32 +    }
    1.33 +
    1.34      protected void setUp() throws Exception {
    1.35 -        URI uri = CasaWrapperModelTest.class.getResource(
    1.36 -                "resources/SynchronousSampleApplication/conf/SynchronousSampleApplication.casa").toURI();
    1.37 -        File casaFile = new File(uri);
    1.38 +        File dataDir = getDataDir();
    1.39 +
    1.40 +        //URI uri = CasaWrapperModelTest.class.getResource(
    1.41 +        //        "resources/SynchronousSampleApplication/conf/SynchronousSampleApplication.casa").toURI();
    1.42 +        //File casaFile = new File(uri);
    1.43 +        File casaFile = new File(dataDir,
    1.44 +                "SynchronousSampleApplication/conf/SynchronousSampleApplication.casa");
    1.45          FileObject casaFileObject = FileUtil.toFileObject(casaFile);
    1.46          ModelSource modelSource = TestCatalogModel.getDefault().createModelSource(casaFileObject, true);
    1.47          casaWrapperModel = new CasaWrapperModel(modelSource);
    1.48          
    1.49 -        URI casaWSDLUri = CasaWrapperModelTest.class.getResource(
    1.50 -                "resources/SynchronousSampleApplication/jbiasa/casa.wsdl").toURI();
    1.51 -        File casaWSDLFile = new File(casaWSDLUri);
    1.52 +        //URI casaWSDLUri = CasaWrapperModelTest.class.getResource(
    1.53 +        //        "resources/SynchronousSampleApplication/jbiasa/casa.wsdl").toURI();
    1.54 +        //File casaWSDLFile = new File(casaWSDLUri);
    1.55 +        File casaWSDLFile = new File(dataDir,
    1.56 +                "SynchronousSampleApplication/jbiasa/casa.wsdl");
    1.57          FileObject casaWSDLFileObject = FileUtil.toFileObject(casaWSDLFile);
    1.58          ModelSource casaWSDLModelSource = TestCatalogModel.getDefault().createModelSource(casaWSDLFileObject, true);
    1.59          
    1.60 @@ -723,6 +747,7 @@
    1.61          assertEquals(serviceQName, newQName);
    1.62      }
    1.63  
    1.64 +
    1.65      /**
    1.66       * Test of getCasaRegion method, of class org.netbeans.modules.compapp.casaeditor.model.casa.CasaWrapperModel.
    1.67       */
     2.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/conf/SynchronousSampleApplication.casa	Fri Nov 23 09:42:33 2007 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,47 +0,0 @@
     2.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
     2.5 -<casa xmlns="http://java.sun.com/xml/ns/casa" xmlns:ns1="http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1" xmlns:ns2="http://localhost/SynchronousSample/SynchronousSample" xmlns:xlink="http://www.w3.org/2000/xlink" xmlns:ns="http://whatever">
     2.6 -    <endpoints>
     2.7 -        <endpoint endpoint-name="partnerlinktyperole1_myRole" interface-name="ns2:portType1" name="endpoint1" service-name="ns1:SynchronousSample"/>
     2.8 -        <endpoint endpoint-name="port1" interface-name="ns2:portType1" name="endpoint2" service-name="ns2:service1"/>
     2.9 -        <endpoint name="endpoint3" endpoint-name="casaPort1" interface-name="ns2:portType1" service-name="ns:casaService1"/>
    2.10 -    </endpoints>
    2.11 -    <service-units>
    2.12 -        <binding-component-service-unit unit-name="sun-file-binding" component-name="sun-file-binding" name="sun-file-binding" description="some description" artifacts-zip="sun-file-binding.jar">
    2.13 -            <ports>
    2.14 -                <port x="117" y="208" bindingType="file">
    2.15 -                    <link xlink:href="../jbiasa/casa.wsdl#xpointer(/definitions/service[@name=&apos;casaService1&apos;]/port[@name=&apos;casaPort1&apos;])" xlink:type="simple"/>
    2.16 -                    <consumes endpoint="endpoint3"/>
    2.17 -                    <provides endpoint="endpoint3"/>
    2.18 -                </port>
    2.19 -            </ports>
    2.20 -        </binding-component-service-unit>
    2.21 -        <service-engine-service-unit artifacts-zip="SynchronousSample.jar" component-name="sun-bpel-engine" defined="true" description="This represents the Application Service Unit" internal="true" name="SynchronousSampleApplication-SynchronousSample" unit-name="SynchronousSample" unknown="false" x="129" y="99">
    2.22 -            <provides endpoint="endpoint1"/>
    2.23 -        </service-engine-service-unit>
    2.24 -        <binding-component-service-unit artifacts-zip="sun-http-binding.jar" component-name="sun-http-binding" description="This represents the Application Service Unit" name="SynchronousSampleApplication-sun-http-binding" unit-name="sun-http-binding">
    2.25 -            <ports>
    2.26 -                <port x="117" y="59">
    2.27 -                    <link xlink:href="../jbiServiceUnits/SynchronousSample/SynchronousSample.wsdl#xpointer(/definitions/service[@name='service1']/port[@name='port1'])" xlink:type="simple"/>
    2.28 -                    <consumes endpoint="endpoint2"/>
    2.29 -                    <provides endpoint="endpoint2"/>
    2.30 -                </port>
    2.31 -            </ports>
    2.32 -        </binding-component-service-unit>
    2.33 -    </service-units>
    2.34 -    <connections>
    2.35 -        <connection consumer="endpoint2" provider="endpoint1" state="unchanged"/>
    2.36 -        <connection state="new" consumer="endpoint3" provider="endpoint1"/>
    2.37 -    </connections>
    2.38 -    <porttypes>
    2.39 -        <link xlink:href="../jbiServiceUnits/SynchronousSample/SynchronousSample.wsdl#xpointer(/definitions/portType[@name='portType1'])" xlink:type="simple"/>
    2.40 -        <link xlink:href="../jbiServiceUnits/SynchronousSample/SynchronousSample.wsdl#xpointer(/definitions/binding[@name='binding1'])" xlink:type="simple"/>
    2.41 -        <link xlink:href="../jbiServiceUnits/SynchronousSample/SynchronousSample.wsdl#xpointer(/definitions/service[@name='service1'])" xlink:type="simple"/>
    2.42 -    </porttypes>
    2.43 -    <bindings/>
    2.44 -    <services/>
    2.45 -    <regions>
    2.46 -        <region name="WSDL Endpoints" width="200"/>
    2.47 -        <region name="JBI Modules" width="500"/>
    2.48 -        <region name="External Modules" width="200"/>
    2.49 -    </regions>
    2.50 -</casa>
     3.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/SynchronousSample/SynchronousSample.wsdl	Fri Nov 23 09:42:33 2007 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,43 +0,0 @@
     3.4 -<?xml version="1.0" encoding="UTF-8"?>
     3.5 -<definitions 
     3.6 -    xmlns="http://schemas.xmlsoap.org/wsdl/"
     3.7 -    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     3.8 -    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
     3.9 -    xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SynchronousSample" targetNamespace="http://localhost/SynchronousSample/SynchronousSample" xmlns:tns="http://localhost/SynchronousSample/SynchronousSample" xmlns:ns="http://xml.netbeans.org/schema/SynchronousSample" xmlns:plink="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
    3.10 -    <types>
    3.11 -        <xsd:schema targetNamespace="http://localhost/SynchronousSample/SynchronousSample">
    3.12 -            <xsd:import namespace="http://xml.netbeans.org/schema/SynchronousSample" schemaLocation="SynchronousSample.xsd"/>
    3.13 -        </xsd:schema>
    3.14 -    </types>
    3.15 -    <message name="requestMessage">
    3.16 -        <part name="inputType" element="ns:typeA"/>
    3.17 -    </message>
    3.18 -    <message name="responseMessage">
    3.19 -        <part name="resultType" element="ns:typeA"/>
    3.20 -    </message>
    3.21 -    <portType name="portType1">
    3.22 -        <operation name="operation1">
    3.23 -            <input name="input1" message="tns:requestMessage"/>
    3.24 -            <output name="output1" message="tns:responseMessage"/>
    3.25 -        </operation>
    3.26 -    </portType>
    3.27 -    <binding name="binding1" type="tns:portType1">
    3.28 -        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    3.29 -        <operation name="operation1">
    3.30 -        <input name="input1">
    3.31 -          <soap:body use="literal"/>
    3.32 -        </input><output name="output1">
    3.33 -    <soap:body use="literal"/>
    3.34 -</output>
    3.35 -        </operation>
    3.36 -    </binding>
    3.37 -    <service name="service1">
    3.38 -        <port name="port1" binding="tns:binding1">
    3.39 -            <documentation/>
    3.40 -            <soap:address location="http://localhost:18181/SynchronousSample"/>
    3.41 -        </port>
    3.42 -    </service>
    3.43 -    <plink:partnerLinkType name="partnerlinktype1">
    3.44 -        <plink:role name="partnerlinktyperole1" portType="tns:portType1"/>
    3.45 -    </plink:partnerLinkType>
    3.46 -</definitions>
     4.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/SynchronousSample/SynchronousSample.xsd	Fri Nov 23 09:42:33 2007 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,56 +0,0 @@
     4.4 -<?xml version="1.0" encoding="UTF-8"?>
     4.5 -
     4.6 -<!--
     4.7 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     4.8 -
     4.9 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    4.10 -
    4.11 -
    4.12 -The contents of this file are subject to the terms of either the GNU
    4.13 -General Public License Version 2 only ("GPL") or the Common
    4.14 -Development and Distribution License("CDDL") (collectively, the
    4.15 -"License"). You may not use this file except in compliance with the
    4.16 -License. You can obtain a copy of the License at
    4.17 -http://www.netbeans.org/cddl-gplv2.html
    4.18 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    4.19 -specific language governing permissions and limitations under the
    4.20 -License.  When distributing the software, include this License Header
    4.21 -Notice in each file and include the License file at
    4.22 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    4.23 -particular file as subject to the "Classpath" exception as provided
    4.24 -by Sun in the GPL Version 2 section of the License file that
    4.25 -accompanied this code. If applicable, add the following below the
    4.26 -License Header, with the fields enclosed by brackets [] replaced by
    4.27 -your own identifying information:
    4.28 -"Portions Copyrighted [year] [name of copyright owner]"
    4.29 -
    4.30 -Contributor(s):
    4.31 -
    4.32 - The Original Software is NetBeans. The Initial Developer of the Original
    4.33 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    4.34 - Microsystems, Inc. All Rights Reserved.
    4.35 -
    4.36 -If you wish your version of this file to be governed by only the CDDL
    4.37 -or only the GPL Version 2, indicate your decision by adding
    4.38 -"[Contributor] elects to include this software in this distribution
    4.39 -under the [CDDL or GPL Version 2] license." If you do not indicate a
    4.40 -single choice of license, a recipient has the option to distribute
    4.41 -your version of this file under either the CDDL, the GPL Version 2 or
    4.42 -to extend the choice of license to its licensees as provided above.
    4.43 -However, if you add GPL Version 2 code and therefore, elected the GPL
    4.44 -Version 2 license, then the option applies only if the new code is
    4.45 -made subject to such option by the copyright holder.
    4.46 --->
    4.47 -
    4.48 -
    4.49 -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    4.50 -            targetNamespace="http://xml.netbeans.org/schema/SynchronousSample"
    4.51 -            xmlns:tns="http://xml.netbeans.org/schema/SynchronousSample"
    4.52 -            elementFormDefault="qualified">
    4.53 -    <xsd:complexType name="simpleProcess">
    4.54 -        <xsd:sequence>
    4.55 -            <xsd:element name="paramA" type="xsd:string"/>
    4.56 -        </xsd:sequence>
    4.57 -    </xsd:complexType>
    4.58 -    <xsd:element name="typeA" type="tns:simpleProcess"/>
    4.59 -</xsd:schema>
     5.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/SynchronousSample/jbi.xml	Fri Nov 23 09:42:33 2007 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,52 +0,0 @@
     5.4 -<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     5.5 -<!--
     5.6 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     5.7 -
     5.8 -Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     5.9 -
    5.10 -
    5.11 -The contents of this file are subject to the terms of either the GNU
    5.12 -General Public License Version 2 only ("GPL") or the Common
    5.13 -Development and Distribution License("CDDL") (collectively, the
    5.14 -"License"). You may not use this file except in compliance with the
    5.15 -License. You can obtain a copy of the License at
    5.16 -http://www.netbeans.org/cddl-gplv2.html
    5.17 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    5.18 -specific language governing permissions and limitations under the
    5.19 -License.  When distributing the software, include this License Header
    5.20 -Notice in each file and include the License file at
    5.21 -nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    5.22 -particular file as subject to the "Classpath" exception as provided
    5.23 -by Sun in the GPL Version 2 section of the License file that
    5.24 -accompanied this code. If applicable, add the following below the
    5.25 -License Header, with the fields enclosed by brackets [] replaced by
    5.26 -your own identifying information:
    5.27 -"Portions Copyrighted [year] [name of copyright owner]"
    5.28 -
    5.29 -Contributor(s):
    5.30 -
    5.31 - The Original Software is NetBeans. The Initial Developer of the Original
    5.32 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    5.33 - Microsystems, Inc. All Rights Reserved.
    5.34 -
    5.35 -If you wish your version of this file to be governed by only the CDDL
    5.36 -or only the GPL Version 2, indicate your decision by adding
    5.37 -"[Contributor] elects to include this software in this distribution
    5.38 -under the [CDDL or GPL Version 2] license." If you do not indicate a
    5.39 -single choice of license, a recipient has the option to distribute
    5.40 -your version of this file under either the CDDL, the GPL Version 2 or
    5.41 -to extend the choice of license to its licensees as provided above.
    5.42 -However, if you add GPL Version 2 code and therefore, elected the GPL
    5.43 -Version 2 license, then the option applies only if the new code is
    5.44 -made subject to such option by the copyright holder.
    5.45 --->
    5.46 -<jbi xmlns="http://java.sun.com/xml/ns/jbi"
    5.47 -     xmlns:ns0="http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1" 
    5.48 -     xmlns:ns1="http://localhost/SynchronousSample/SynchronousSample" 
    5.49 -     version="1.0">
    5.50 -    <services binding-component="false">
    5.51 -        <provides endpoint-name="partnerlinktyperole1_myRole" 
    5.52 -                  interface-name="ns1:portType1" 
    5.53 -                  service-name="ns0:SynchronousSample"/>
    5.54 -    </services>
    5.55 -</jbi>
    5.56 \ No newline at end of file
     6.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/sun-file-binding/jbi.xml	Fri Nov 23 09:42:33 2007 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,6 +0,0 @@
     6.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
     6.5 -<jbi xmlns="http://java.sun.com/xml/ns/jbi" xmlns:ns1="http://localhost/SynchronousSample/SynchronousSample" xmlns:ns2="http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1" xmlns:ns3="http://whatever" version="1.0">
     6.6 -    <services binding-component="true">
     6.7 -        <consumes endpoint-name="casaPort1" interface-name="ns1:portType1" service-name="ns3:casaService1"/>
     6.8 -    </services>
     6.9 -</jbi>
     7.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiServiceUnits/sun-http-binding/jbi.xml	Fri Nov 23 09:42:33 2007 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,6 +0,0 @@
     7.4 -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
     7.5 -<jbi xmlns="http://java.sun.com/xml/ns/jbi" xmlns:ns1="http://localhost/SynchronousSample/SynchronousSample" xmlns:ns2="http://enterprise.netbeans.org/bpel/SynchronousSample/SynchronousSample_1" xmlns:ns3="http://whatever" version="1.0">
     7.6 -    <services binding-component="true">
     7.7 -        <consumes endpoint-name="port1" interface-name="ns1:portType1" service-name="ns1:service1"/>
     7.8 -    </services>
     7.9 -</jbi>
     8.1 --- a/compapp.casaeditor/test/unit/src/org/netbeans/modules/compapp/casaeditor/model/casa/resources/SynchronousSampleApplication/jbiasa/casa.wsdl	Fri Nov 23 09:42:33 2007 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,17 +0,0 @@
     8.4 -<?xml version="1.0" encoding="UTF-8"?>
     8.5 -<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
     8.6 -             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     8.7 -             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
     8.8 -             targetNamespace="http://whatever"
     8.9 -             xmlns:myns="http://whatever"
    8.10 -             name="casawsdl" xmlns:file="http://schemas.sun.com/jbi/wsdl-extensions/file/">
    8.11 -    <portType name="dummyCasaPortType"/>
    8.12 -    <binding name="casaBinding1" type="myns:dummyCasaPortType">
    8.13 -        <file:binding/>
    8.14 -    </binding>
    8.15 -    <service name="casaService1">
    8.16 -        <port name="casaPort1" binding="myns:casaBinding1">
    8.17 -            <file:address fileDirectory="C:\Temp"/>
    8.18 -        </port>
    8.19 -    </service>
    8.20 -</definitions>