axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/test/utils/cache TestJavaClass.java TestJavaMethod.java
Date Tue, 07 Aug 2001 18:58:49 GMT
rubys       01/08/07 11:58:49

  Modified:    java/src/org/apache/axis/handlers/http
                        HTTPActionHandler.java
               java/test/RPCDispatch TestSerializedRPC.java
               java/test/encoding TestDeser.java TestHrefs.java
               java/test/functional TestEchoSample.java
               java/test/utils TestAxisClassLoader.java TestQFault.java
                        TestQName.java TestXMLUtils.java
               java/test/utils/cache TestJavaClass.java TestJavaMethod.java
  Log:
  find . -name *.java -exec perl -e 's/assert\(/assertTrue(/' -p -i.bak {} \;
  
  Revision  Changes    Path
  1.6       +1 -1      xml-axis/java/src/org/apache/axis/handlers/http/HTTPActionHandler.java
  
  Index: HTTPActionHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/HTTPActionHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HTTPActionHandler.java	2001/07/12 15:04:00	1.5
  +++ HTTPActionHandler.java	2001/08/07 18:58:48	1.6
  @@ -100,7 +100,7 @@
   
               // handle empty SOAPAction
               if (action.length() > 0 && action.charAt(0) == '\"') {
  -                // assert(action.endsWith("\"")
  +                // assertTrue(action.endsWith("\"")
                   if (action.equals("\"\"")) {
                       action = "";
                   } else {
  
  
  
  1.5       +1 -1      xml-axis/java/test/RPCDispatch/TestSerializedRPC.java
  
  Index: TestSerializedRPC.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/RPCDispatch/TestSerializedRPC.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestSerializedRPC.java	2001/07/17 12:41:24	1.4
  +++ TestSerializedRPC.java	2001/08/07 18:58:48	1.5
  @@ -104,7 +104,7 @@
           // Extract the list of parameters from the body
           Vector arglist = body.getParams();
           assertNotNull("arglist", arglist);
  -        assert("param.size()>0", arglist.size()>0);
  +        assertTrue("param.size()>0", arglist.size()>0);
   
           // Return the first parameter
           RPCParam param = (RPCParam) arglist.get(0);
  
  
  
  1.14      +1 -1      xml-axis/java/test/encoding/TestDeser.java
  
  Index: TestDeser.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TestDeser.java	2001/07/29 15:43:56	1.13
  +++ TestDeser.java	2001/08/07 18:58:48	1.14
  @@ -103,7 +103,7 @@
   
          Vector arglist = body.getParams();
          assertNotNull("arglist", arglist);
  -       assert("param.size()>0", arglist.size()>0);
  +       assertTrue("param.size()>0", arglist.size()>0);
   
          RPCParam param = (RPCParam) arglist.get(0);
          assertNotNull("param", param);
  
  
  
  1.10      +1 -1      xml-axis/java/test/encoding/TestHrefs.java
  
  Index: TestHrefs.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestHrefs.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestHrefs.java	2001/07/15 16:40:16	1.9
  +++ TestHrefs.java	2001/08/07 18:58:48	1.10
  @@ -82,7 +82,7 @@
   
          Vector arglist = body.getParams();
          assertNotNull("arglist", arglist);
  -       assert("param.size()>0", arglist.size()>0);
  +       assertTrue("param.size()>0", arglist.size()>0);
   
          RPCParam param = (RPCParam) arglist.get(0);
          assertNotNull("param", param);
  
  
  
  1.2       +1 -1      xml-axis/java/test/functional/TestEchoSample.java
  
  Index: TestEchoSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestEchoSample.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestEchoSample.java	2001/07/03 20:22:06	1.1
  +++ TestEchoSample.java	2001/08/07 18:58:48	1.2
  @@ -78,7 +78,7 @@
           // define the tests using JUnit assert facilities
           TestClient client = new TestClient() {
               public void verify(String method, Object sent, Object gotBack) {
  -                assert(method + ": " + gotBack, equals(sent, gotBack));
  +                assertTrue(method + ": " + gotBack, equals(sent, gotBack));
               }
           };
   
  
  
  
  1.2       +7 -7      xml-axis/java/test/utils/TestAxisClassLoader.java
  
  Index: TestAxisClassLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestAxisClassLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestAxisClassLoader.java	2001/05/22 18:42:52	1.1
  +++ TestAxisClassLoader.java	2001/08/07 18:58:48	1.2
  @@ -23,7 +23,7 @@
       {
   	AxisClassLoader expect = AxisClassLoader.getClassLoader();
   	AxisClassLoader actual = AxisClassLoader.getClassLoader("<default_class_loader>");
  -        assert(expect instanceof AxisClassLoader);
  +        assertTrue(expect instanceof AxisClassLoader);
           assertEquals(expect, actual);
       }
       
  @@ -54,7 +54,7 @@
           java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
           Class clazz = stack.getClass();
           acl.registerClass("myStack",clazz);
  -        assert(acl.isClassRegistered("myStack"));
  +        assertTrue(acl.isClassRegistered("myStack"));
       }
   
       public void testIsClassRegistered()
  @@ -67,7 +67,7 @@
           {
               fail("Nonce class name should not be registered.");
           }
  -        assert(acl.isClassRegistered("anotherStack"));
  +        assertTrue(acl.isClassRegistered("anotherStack"));
       }
   
       public void testDeregisterClass()
  @@ -76,7 +76,7 @@
           java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
           Class clazz = stack.getClass();
           acl.registerClass("myStack",clazz);
  -        assert(acl.isClassRegistered("myStack"));
  +        assertTrue(acl.isClassRegistered("myStack"));
           acl.deregisterClass("myStack");
           if (acl.isClassRegistered("myStack"))
           {
  @@ -88,13 +88,13 @@
       {
   	AxisClassLoader acl = AxisClassLoader.getClassLoader();
           Class clazz = acl.loadClass("java.util.BitSet"); //BitSet was chosen arbitrarily

  -        assert(clazz.getName().equals("java.util.BitSet"));
  +        assertTrue(clazz.getName().equals("java.util.BitSet"));
   
           java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
           Class clazz1 = stack.getClass();
           acl.registerClass("myStack",clazz1);
           Class klass = acl.loadClass("myStack");
  -        assert(klass.getName().equals("java.util.Stack"));
  +        assertTrue(klass.getName().equals("java.util.Stack"));
       }
   
       public void testLookup() throws ClassNotFoundException
  @@ -102,6 +102,6 @@
   	AxisClassLoader acl = AxisClassLoader.getClassLoader();
           JavaClass jc = acl.lookup("java.util.BitSet"); //BitSet was chosen arbitrarily

           Class c = jc.getJavaClass(); 
  -        assert(c.getName().equals("java.util.BitSet"));
  +        assertTrue(c.getName().equals("java.util.BitSet"));
       }
   }
  
  
  
  1.2       +3 -3      xml-axis/java/test/utils/TestQFault.java
  
  Index: TestQFault.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestQFault.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestQFault.java	2001/05/22 18:42:52	1.1
  +++ TestQFault.java	2001/08/07 18:58:48	1.2
  @@ -21,8 +21,8 @@
       public void testQFaultConstructorWith3Params()
       {
           QFault qfault = new QFault("xsl","include","extra");
  -        assert(qfault instanceof QName);
  -        assert(qfault instanceof QFault);
  +        assertTrue(qfault instanceof QName);
  +        assertTrue(qfault instanceof QFault);
           assertEquals("include.extra", qfault.getLocalPart());
       }   
       
  @@ -30,7 +30,7 @@
       {
           QFault qfault = new QFault("rdf","title");
           QFault qfaultWithMinorCode = new QFault(qfault,"extraBits");
  -        assert(qfaultWithMinorCode instanceof QFault);
  +        assertTrue(qfaultWithMinorCode instanceof QFault);
           assertEquals("title.extraBits", qfaultWithMinorCode.getLocalPart());
       }   
       
  
  
  
  1.3       +6 -6      xml-axis/java/test/utils/TestQName.java
  
  Index: TestQName.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestQName.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestQName.java	2001/05/22 23:52:22	1.2
  +++ TestQName.java	2001/08/07 18:58:48	1.3
  @@ -20,7 +20,7 @@
       public void testQNameDefaultConstructor()
       {
           QName qname = new QName();
  -        assert(qname instanceof QName);
  +        assertTrue(qname instanceof QName);
           assertNull(qname.getLocalPart());
       }   
       
  @@ -65,15 +65,15 @@
           ////QName qname5 = new QName("PREFIX:LOCALPART", elem);
   
           // the following should NOT throw a NullPointerException
  -        assert(!qname1.equals(qname2));
  +        assertTrue(!qname1.equals(qname2));
          
           //Note: this test is comparing the same two QName objects as above, but
           //due to the order and the implementation of the QName.equals() method,
           //this test passes without incurring a NullPointerException. 
  -        assert(!qname2.equals(qname1));
  +        assertTrue(!qname2.equals(qname1));
   
  -        assert(qname2.equals(qname3));
  -        assert(!qname3.equals(qname4));
  +        assertTrue(qname2.equals(qname3));
  +        assertTrue(!qname3.equals(qname4));
       }
       
       public void testHashCode()
  @@ -82,6 +82,6 @@
           QName compare = new QName("xsl", "text");
           QName contrast = new QName("xso", "text");
           assertEquals(control.hashCode(), compare.hashCode());
  -        assert(!(control.hashCode() == contrast.hashCode()));
  +        assertTrue(!(control.hashCode() == contrast.hashCode()));
       }
   }
  
  
  
  1.5       +5 -5      xml-axis/java/test/utils/TestXMLUtils.java
  
  Index: TestXMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestXMLUtils.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestXMLUtils.java	2001/05/23 18:20:13	1.4
  +++ TestXMLUtils.java	2001/08/07 18:58:48	1.5
  @@ -24,13 +24,13 @@
       public void testInit()
       {
           DocumentBuilderFactory dbf = XMLUtils.init();
  -        assert(dbf instanceof DocumentBuilderFactory);
  +        assertTrue(dbf instanceof DocumentBuilderFactory);
       }
   
       public void testNewDocumentNoArgConstructor()
       {
           Document doc = XMLUtils.newDocument();
  -        assert(doc instanceof org.w3c.dom.Document);
  +        assertTrue(doc instanceof org.w3c.dom.Document);
       }
       
       public void testNewDocumentInputSource()
  @@ -38,7 +38,7 @@
           Reader reader = (Reader)this.getTestXml("reader");
           InputSource inputsrc = new InputSource(reader);
           Document doc = XMLUtils.newDocument(inputsrc);
  -        assert(doc instanceof org.w3c.dom.Document);
  +        assertTrue(doc instanceof org.w3c.dom.Document);
       }
   
       public void testNewDocumentInputStream()
  @@ -46,7 +46,7 @@
           InputStream iostream = (InputStream)this.getTestXml("inputstream");
           InputSource inputsrc = new InputSource(iostream);
           Document doc = XMLUtils.newDocument(inputsrc);
  -        assert(doc instanceof org.w3c.dom.Document);
  +        assertTrue(doc instanceof org.w3c.dom.Document);
       }
      
       /* This test will fail unless you are connected to the Web, so just skip
  @@ -58,7 +58,7 @@
       {
           String uri = "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";
           Document doc = XMLUtils.newDocument(uri);
  -        assert(doc instanceof org.w3c.dom.Document);
  +        assertTrue(doc instanceof org.w3c.dom.Document);
       }
       */
   
  
  
  
  1.4       +2 -2      xml-axis/java/test/utils/cache/TestJavaClass.java
  
  Index: TestJavaClass.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/cache/TestJavaClass.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestJavaClass.java	2001/06/04 18:56:56	1.3
  +++ TestJavaClass.java	2001/08/07 18:58:49	1.4
  @@ -22,8 +22,8 @@
           Class c = new java.util.Date().getClass(); 
           JavaClass jc = new JavaClass(c);
           assertNotNull(jc);
  -        assert(jc.getJavaClass().getName().equals("java.util.Date"));
  -        assert(!jc.getJavaClass().getName().equals("java.util.D"));
  +        assertTrue(jc.getJavaClass().getName().equals("java.util.Date"));
  +        assertTrue(!jc.getJavaClass().getName().equals("java.util.D"));
       }
   
       public void testGetMethod()
  
  
  
  1.2       +2 -2      xml-axis/java/test/utils/cache/TestJavaMethod.java
  
  Index: TestJavaMethod.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/cache/TestJavaMethod.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestJavaMethod.java	2001/05/22 18:43:03	1.1
  +++ TestJavaMethod.java	2001/08/07 18:58:49	1.2
  @@ -39,7 +39,7 @@
           catch (NullPointerException ex) {
               gotError = true;
           }
  -        assert("Expected NullPointerException", gotError);
  +        assertTrue("Expected NullPointerException", gotError);
   
           //on the other hand, make sure methods with 0 params work...
           JavaMethod jmCapacity = new JavaMethod(vector, "capacity");
  @@ -69,6 +69,6 @@
           catch (NullPointerException ex) {
               gotError = true;
           }
  -        assert("Expected NullPointerException", gotError);
  +        assertTrue("Expected NullPointerException", gotError);
       }
   }
  
  
  

Mime
View raw message