axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-axis/java/test/utils/cache TestJavaClass.java
Date Wed, 17 Oct 2001 19:34:24 GMT
bloritsch    01/10/17 12:34:24

  Modified:    java/test/utils/cache TestJavaClass.java
  Log:
  Add more meaningful messages to tests.
  
  Revision  Changes    Path
  1.5       +20 -12    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestJavaClass.java	2001/08/07 18:58:49	1.4
  +++ TestJavaClass.java	2001/10/17 19:34:24	1.5
  @@ -21,9 +21,11 @@
       {
           Class c = new java.util.Date().getClass(); 
           JavaClass jc = new JavaClass(c);
  -        assertNotNull(jc);
  -        assertTrue(jc.getJavaClass().getName().equals("java.util.Date"));
  -        assertTrue(!jc.getJavaClass().getName().equals("java.util.D"));
  +        assertNotNull("The JavaClass was null", jc);
  +        assertTrue("JavaClass name is not 'java.util.Date', it is: " + jc.getClass().getName(),
  +                   jc.getJavaClass().getName().equals("java.util.Date"));
  +        assertTrue("JavaClass cut off the name of the real class.",
  +                   !jc.getJavaClass().getName().equals("java.util.D"));
       }
   
       public void testGetMethod()
  @@ -39,11 +41,15 @@
           Method add1 = jcVec.getMethod("add", 1);
           Method add2 = jcVec.getMethod("add", 2);
   
  -        assertEquals("countTokens", countTkns.getName());
  -        assertEquals("nextToken", nextTkn.getName());
  -
  -        assertEquals("boolean", add1.getReturnType().getName());
  -        assertEquals("void", add2.getReturnType().getName());
  +        assertEquals("countTkns name was not 'countTokens', it is: " + countTkns.getName(),
  +                     "countTokens", countTkns.getName());
  +        assertEquals("nextTkn name was not 'nextToken', it is: " + nextTkn.getName(),
  +                     "nextToken", nextTkn.getName());
  +
  +        assertEquals("Return type was not 'boolean', it was: " + add1.getReturnType().getName(),
  +                     "boolean", add1.getReturnType().getName());
  +        assertEquals("Return type was not 'void', it was: " + add2.getReturnType().getName(),
  +                     "void", add2.getReturnType().getName());
       }
   
       public void testNoSuchMethod()
  @@ -52,7 +58,7 @@
           JavaClass jcVec = new JavaClass(v);
   
           Method add7 = jcVec.getMethod("add", 7);
  -        assertNull(add7);
  +        assertNull("add7 was not null", add7);
       }
   
       public void testUnknownNumberOfArgs()
  @@ -61,10 +67,12 @@
           JavaClass jcVec = new JavaClass(v);
   
           Method add7 = jcVec.getMethod("add", -1);
  -        assertNull(add7);
  +        assertNull("add7 was not null", add7);
   
           Method insertElementAt = jcVec.getMethod("insertElementAt", -1);
  -        assertEquals(2, insertElementAt.getParameterTypes().length);
  -        assertEquals("void", insertElementAt.getReturnType().getName());
  +        assertEquals("Length was not 2, it was: " + insertElementAt.getParameterTypes().length,
  +                     2, insertElementAt.getParameterTypes().length);
  +        assertEquals("Return type was not 'void', it was: " + insertElementAt.getReturnType().getName(),
  +                     "void", insertElementAt.getReturnType().getName());
       }
   }
  
  
  

Mime
View raw message