You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bl...@apache.org on 2001/10/17 19:43:02 UTC

cvs commit: xml-axis/java/test/functional TestTCPTransportSample.java

bloritsch    01/10/17 10:43:02

  Modified:    java/test/functional TestTCPTransportSample.java
  Log:
  Add failure messages and make sure thrown exceptions are AssertionFailedErrors
  
  Revision  Changes    Path
  1.6       +5 -4      xml-axis/java/test/functional/TestTCPTransportSample.java
  
  Index: TestTCPTransportSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestTCPTransportSample.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestTCPTransportSample.java	2001/09/12 14:48:08	1.5
  +++ TestTCPTransportSample.java	2001/10/17 17:43:01	1.6
  @@ -68,6 +68,7 @@
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
   
   import junit.framework.TestCase;
  +import junit.framework.AssertionFailedError;
   
   /** Test the stock sample code.
    */
  @@ -113,9 +114,9 @@
               if (ret instanceof Float) {
                   res = (Float) ret;
                   // System.out.println( symbol + ": " + res );
  -                assertEquals("TestTCPTransportSample: stock price should be 55.25", res.floatValue(), 55.25, 0.000001);
  +                assertEquals("TestTCPTransportSample: stock price should be 55.25 +/- 0.000001", res.floatValue(), 55.25, 0.000001);
               } else {
  -                throw new Exception("Bad return value from TCP stock test: "+ret);
  +                throw new AssertionFailedError("Bad return value from TCP stock test: "+ret);
               }
           }
           
  @@ -123,7 +124,7 @@
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
               e.printStackTrace();
  -            throw new Exception("Fault returned from TCP stock test: "+e);
  +            throw new AssertionFailedError("Fault returned from TCP stock test: "+e);
           }
       }
       
  @@ -152,7 +153,7 @@
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
               e.printStackTrace();
  -            throw new Exception("Fault returned from test: "+e);
  +            throw new AssertionFailedError("Fault returned from test: "+e);
           }
       }