incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eno...@apache.org
Subject svn commit: r415734 - in /incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools: IDLToWSDLTest.java WSDLToIDLTest.java processors/IDLToWSDLGenerationTest.java processors/WSDLToIDLGenerationTest.java
Date Tue, 20 Jun 2006 17:37:42 GMT
Author: enolan
Date: Tue Jun 20 10:37:42 2006
New Revision: 415734

URL: http://svn.apache.org/viewvc?rev=415734&view=rev
Log:
Fixing checkstyle errors.

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/WSDLToIDLTest.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/processors/WSDLToIDLGenerationTest.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?rev=415734&r1=415733&r2=415734&view=diff
==============================================================================
--- 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 Tue
Jun 20 10:37:42 2006
@@ -19,23 +19,16 @@
 
 package org.apache.yoko.tools;
 
-import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
 import java.net.URL;
 import java.security.Permission;
 
-import javax.wsdl.Definition;
-import javax.xml.namespace.QName;
-
 import org.apache.yoko.tools.common.ToolTestBase;
-import org.apache.yoko.tools.processors.idl.IDLToWSDLProcessor;
 import org.apache.yoko.tools.utils.TestUtils;
 
 public class IDLToWSDLTest extends ToolTestBase {

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java?rev=415734&r1=415733&r2=415734&view=diff
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java Tue
Jun 20 10:37:42 2006
@@ -26,10 +26,9 @@
 import java.io.DataInputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.InputStreamReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.io.PrintStream;
-import java.net.URL;
 import java.security.Permission;
 
 import javax.wsdl.Definition;

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?rev=415734&r1=415733&r2=415734&view=diff
==============================================================================
--- 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
Tue Jun 20 10:37:42 2006
@@ -20,7 +20,6 @@
 package org.apache.yoko.tools.processors;
 
 import java.io.BufferedReader;
-import java.io.File;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.URL;
@@ -29,15 +28,14 @@
 
 import junit.framework.TestCase;
 
-import org.objectweb.celtix.tools.common.ProcessorEnvironment;
-
 import org.apache.yoko.tools.common.ToolCorbaConstants;
 import org.apache.yoko.tools.processors.idl.IDLToWSDLProcessor;
+import org.objectweb.celtix.tools.common.ProcessorEnvironment;
 
 public class IDLToWSDLGenerationTest extends TestCase {
 
-    public static String START_COMMENT = "<!--";
-    public static String END_COMMENT = "-->";
+    public static final  String START_COMMENT = "<!--";
+    public static final  String END_COMMENT = "-->";
 
     public IDLToWSDLGenerationTest(String name) {
         super(name);
@@ -53,10 +51,12 @@
         junit.textui.TestRunner.run(IDLToWSDLGenerationTest.class);
     }
     
-    public void testWSDLGeneration(String source_idl_filename, String expected_wsdl_filename)
throws Exception {      
-        URL idl = getClass().getResource(source_idl_filename);
+    public void testWSDLGeneration(String sourceIdlFilename, 
+                                   String expectedWsdlFilename) 
+        throws Exception {      
+        URL idl = getClass().getResource(sourceIdlFilename);
         ProcessorEnvironment env = new ProcessorEnvironment();
-        Map<String,Object> cfg = new HashMap<String,Object>();
+        Map<String, Object> cfg = new HashMap<String, Object>();
         cfg.put(ToolCorbaConstants.CFG_IDLFILE, idl.getFile());
         env.setParameters(cfg);
         IDLToWSDLProcessor processor = new IDLToWSDLProcessor();
@@ -65,7 +65,7 @@
         processor.setOutputStream(out);
         processor.process();
 
-        InputStream origstream = getClass().getResourceAsStream(expected_wsdl_filename);
+        InputStream origstream = getClass().getResourceAsStream(expectedWsdlFilename);
         byte orig[] = inputStreamToBytes(origstream);
         checkWSDLStrings(orig, out.toByteArray());
     }
@@ -117,8 +117,9 @@
         byte[] buffer = new byte[1024];
         int len;
 
-        while((len = in.read(buffer)) >= 0)
-        out.write(buffer, 0, len);
+        while ((len = in.read(buffer)) >= 0) {
+            out.write(buffer, 0, len);
+        }
 
         in.close();
         out.close();

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java?rev=415734&r1=415733&r2=415734&view=diff
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
(original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
Tue Jun 20 10:37:42 2006
@@ -21,41 +21,20 @@
 
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
-import java.io.File;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.ByteArrayOutputStream;
 import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.Definition;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.ExtensionRegistry;
-import javax.wsdl.xml.WSDLWriter;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
 
 import junit.framework.TestCase;
 
-import org.apache.schemas.yoko.bindings.corba.BindingType;
-import org.apache.schemas.yoko.bindings.corba.OperationType;
-import org.apache.yoko.tools.common.CORBAConstants;
-import org.apache.yoko.tools.processors.wsdl.WSDLCorbaFactory;
-import org.apache.yoko.tools.processors.wsdl.WSDLToCorbaBinding;
 import org.apache.yoko.tools.processors.wsdl.WSDLToIDLAction;
-import org.apache.yoko.tools.processors.wsdl.WSDLToTypeProcessor;
 
 public class WSDLToIDLGenerationTest extends TestCase {
 
-    public static String START_COMMENT = "/*";
-    public static String END_COMMENT = "*/";
+    protected static final String START_COMMENT = "/*";
+    protected static final String END_COMMENT = "*/";
 
     public WSDLToIDLGenerationTest(String name) {
         super(name);
@@ -76,9 +55,7 @@
     private void checkIDLStrings(byte orig[], byte generated[]) throws Exception {
         BufferedReader origReader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(orig)));
         BufferedReader genReader = new BufferedReader(
-                                                      new InputStreamReader(
-                                                                            new ByteArrayInputStream(
-                                                                                        
            generated)));
+                                       new InputStreamReader(new ByteArrayInputStream(generated)));
 
         String sorig = origReader.readLine();
         String sgen = genReader.readLine();
@@ -122,15 +99,16 @@
         byte[] buffer = new byte[1024];
         int len;
 
-        while((len = in.read(buffer)) >= 0)
-        out.write(buffer, 0, len);
+        while ((len = in.read(buffer)) >= 0) {
+            out.write(buffer, 0, len);
+        }
 
         in.close();
         out.close();
         return out.toByteArray();
     } 
 
-    public void test_OnewayGeneration() throws Exception {
+    public void testOnewayGeneration() throws Exception {
         
         WSDLToIDLAction idlgen = new WSDLToIDLAction();
         String fileName = getClass().getResource("/idlgen/oneway.wsdl").toString();



Mime
View raw message