You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by en...@apache.org on 2007/03/30 10:28:40 UTC

svn commit: r524032 - in /incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools: IDLToWSDLTest.java processors/IDLToWSDLGenerationTest.java utils/WSDLGenerationTester.java

Author: enolan
Date: Fri Mar 30 03:28:28 2007
New Revision: 524032

URL: http://svn.apache.org/viewvc?view=rev&rev=524032
Log:
Yoko-322 - checkstyle errors in eclipse in the tools module

Modified:
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java?view=diff&rev=524032&r1=524031&r2=524032
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java Fri Mar 30 03:28:28 2007
@@ -30,12 +30,12 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
-import java.net.URL;
 import java.security.Permission;
 
 import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
 
 import org.apache.yoko.tools.common.ToolCorbaConstants;
 import org.apache.yoko.tools.common.ToolTestBase;
@@ -191,18 +191,20 @@
     public void doTestSequenceOctetMappingOption(String encoding) throws Exception {
         File input = new File(getClass().getResource("/idl/sequence_octet.idl").getFile());
         File actual = new File(output, "sequence_octet.wsdl");
-        File expected = new File(getClass().getResource("/idl/expected_" + encoding + "_sequence_octet.wsdl").getFile());
+        File expected = new File(getClass().getResource("/idl/expected_" 
+                                                        + encoding + "_sequence_octet.wsdl").getFile());
         
         String[] args = new String[] {"-s", encoding,
                                       "-o", output.toString(),
                                       input.toString()
-                                      };
+        };
         int exc = execute(args);
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);
     }
     
-    private void doTestGeneratedWsdl(File expected, File actual) throws FileNotFoundException, XMLStreamException, Exception {
+    private void doTestGeneratedWsdl(File expected, File actual) 
+        throws FileNotFoundException, XMLStreamException, Exception {
         InputStream actualFileStream = new FileInputStream(actual);
         InputStream expectedFileStream = new FileInputStream(expected);
         
@@ -218,12 +220,13 @@
     public void testSchemaNamespace() throws Exception {
         File input = new File(getClass().getResource("/idl/HelloWorld.idl").getFile());
         File actual = new File(output, "HelloWorld.wsdl");
-        File expected = new File(getClass().getResource("/idl/expected_HelloWorld_schema_namespace.wsdl").getFile());
+        File expected = 
+            new File(getClass().getResource("/idl/expected_HelloWorld_schema_namespace.wsdl").getFile());
         
         String[] args = new String[] {"-x", "http://yoko.org/foobar/schema",
                                       "-o", output.toString(),
                                       input.toString()
-                                      };
+        };
         int exc = execute(args);
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);
@@ -233,17 +236,20 @@
     public void testCorbaAddressFile() throws Exception {
         File input = new File(getClass().getResource("/idl/HelloWorld.idl").getFile());
         File actual = new File(output, "HelloWorld.wsdl");
-        File expected = new File(getClass().getResource("/idl/expected_HelloWorld_corba_address_file.wsdl").getFile());
+        File expected = 
+            new File(getClass().getResource("/idl/expected_HelloWorld_corba_address_file.wsdl").getFile());
         
         // create temporary file containing ior
         File addressFile = new File(output, "HelloWorld.idl");
         FileWriter addressFileWriter = new FileWriter(addressFile);
         addressFileWriter.write(
-           "IOR:010000001400000049444c3a48656c6c6f576f726c64493a312e3000020000000000000080000000010101001e0000"
-           + "006d766573636f76692e6475626c696e2e656d65612e696f6e612e636f6d0022064d0000003a5c6d766573636f76692e64"
-           + "75626c696e2e656d65612e696f6e612e636f6d3a48656c6c6f576f726c642f48656c6c6f576f726c643a6d61726b65723a" 
-           + "3a49523a48656c6c6f576f726c644900000000000000000100000018000000010000000100000000000000080000000100"
-           + "0000305f5449"
+            "IOR:010000001400000049444c3a48656c6c6f576f726c64493a312e300002"
+            + "0000000000000080000000010101001e0000006d766573636f76692e6475"
+            + "626c696e2e656d65612e696f6e612e636f6d0022064d0000003a5c6d7665"
+            + "73636f76692e6475626c696e2e656d65612e696f6e612e636f6d3a48656c"
+            + "6c6f576f726c642f48656c6c6f576f726c643a6d61726b65723a3a49523a"
+            + "48656c6c6f576f726c644900000000000000000100000018000000010000"
+            + "0001000000000000000800000001000000305f5449"
         );
         addressFileWriter.close();
         addressFile.deleteOnExit();
@@ -251,7 +257,7 @@
         String[] args = new String[] {"-f", addressFile.toString(),
                                       "-o", output.toString(),
                                       input.toString()
-                                      };
+        };
         int exc = execute(args);
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);
@@ -261,12 +267,13 @@
     public void testCorbaTypeMapTargetNamespace() throws Exception {
         File input = new File(getClass().getResource("/idl/sequence_octet.idl").getFile());
         File actual = new File(output, "sequence_octet.wsdl");
-        File expected = new File(getClass().getResource("/idl/expected_sequence_octet_corba_typemap_tns.wsdl").getFile());
+        File expected = 
+            new File(getClass().getResource("/idl/expected_sequence_octet_corba_typemap_tns.wsdl").getFile());
         
         String[] args = new String[] {"-t", "http://yoko.org/foobar/typemap",
                                       "-o", output.toString(),
                                       input.toString()
-                                      };
+        };
         int exc = execute(args);
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);
@@ -281,7 +288,7 @@
         String[] args = new String[] {"-b",
                                       "-o", output.toString(),
                                       input.toString()
-                                      };
+        };
         int exc = execute(args);
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);
@@ -296,7 +303,7 @@
         String[] args = new String[] {"-b",
                                       "-o", output.toString(),
                                       input.toString()
-                                      };
+        };
         int exc = execute(args);
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);        

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java?view=diff&rev=524032&r1=524031&r2=524032
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java Fri Mar 30 03:28:28 2007
@@ -20,14 +20,11 @@
 package org.apache.yoko.tools.processors;
 
 import java.io.ByteArrayInputStream;
-import java.io.BufferedReader;
 import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
@@ -40,7 +37,7 @@
 
 public class IDLToWSDLGenerationTest extends TestCase {
 
-    public XMLInputFactory factory;
+    private XMLInputFactory factory;
     private WSDLGenerationTester wsdlGenTester;
 
     public IDLToWSDLGenerationTest(String name) {

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java?view=diff&rev=524032&r1=524031&r2=524032
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java Fri Mar 30 03:28:28 2007
@@ -1,19 +1,9 @@
 package org.apache.yoko.tools.utils;
 
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
-import org.apache.yoko.tools.common.ProcessorEnvironment;
-import org.apache.yoko.tools.common.ToolCorbaConstants;
-import org.apache.yoko.tools.processors.idl.IDLToWSDLProcessor;
-
 import junit.framework.Assert;
 
 public class WSDLGenerationTester {
@@ -78,10 +68,10 @@
         }
     }
     
-   private void compareEndElement(XMLStreamReader orig, XMLStreamReader actual)
-       throws Exception {
-       Assert.assertEquals("End element is not matched", orig.getName(), actual.getName());
-   }
+    private void compareEndElement(XMLStreamReader orig, XMLStreamReader actual)
+        throws Exception {
+        Assert.assertEquals("End element is not matched", orig.getName(), actual.getName());
+    }
                                  
     private void compareCharacters(XMLStreamReader orig, XMLStreamReader actual)
         throws Exception {