avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/util/test CompositeExceptionTestCase.java
Date Mon, 21 Apr 2003 20:48:45 GMT
bloritsch    2003/04/21 13:48:45

  Modified:    fortress/src/test/org/apache/avalon/fortress/util/test
                        CompositeExceptionTestCase.java
  Log:
  add new testcase, and fix contracts/semantics of compositeexception
  
  Revision  Changes    Path
  1.2       +10 -11    avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/util/test/CompositeExceptionTestCase.java
  
  Index: CompositeExceptionTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/util/test/CompositeExceptionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CompositeExceptionTestCase.java	21 Apr 2003 20:48:26 -0000	1.1
  +++ CompositeExceptionTestCase.java	21 Apr 2003 20:48:45 -0000	1.2
  @@ -50,7 +50,6 @@
   package org.apache.avalon.fortress.util.test;
   
   import junit.framework.TestCase;
  -import org.apache.avalon.fortress.InitializationException;
   import org.apache.avalon.fortress.util.CompositeException;
   
   /**
  @@ -71,8 +70,8 @@
       public void setUp()
       {
           m_exceptions = new Exception[2];
  -        m_exceptions[0] = new RuntimeException("Test1");
  -        m_exceptions[1] = new RuntimeException("Test2");
  +        m_exceptions[0] = new RuntimeException( "Test1" );
  +        m_exceptions[1] = new RuntimeException( "Test2" );
       }
   
       public void testRegularCreation()
  @@ -95,9 +94,9 @@
           Exception[] exceptions = exc.getExceptions();
           assertEquals( m_exceptions.length, exceptions.length );
   
  -        for (int i = 0; i < exceptions.length; i++)
  +        for ( int i = 0; i < exceptions.length; i++ )
           {
  -            assertEquals( m_exceptions[i], exceptions[i]);
  +            assertEquals( m_exceptions[i], exceptions[i] );
           }
       }
   
  @@ -125,21 +124,21 @@
       {
           try
           {
  -            new CompositeException(null);
  -            fail("Did not throw an IllegalArgumentException");
  +            new CompositeException( null );
  +            fail( "Did not throw an IllegalArgumentException" );
           }
  -        catch(IllegalArgumentException iae)
  +        catch ( IllegalArgumentException iae )
           {
               // SUCCESS!!
           }
  -        catch(Exception e)
  +        catch ( Exception e )
           {
  -            fail("Threw the wrong exception: " + e.getClass().getName());
  +            fail( "Threw the wrong exception: " + e.getClass().getName() );
           }
   
           try
           {
  -            new CompositeException( new Exception[] {} );
  +            new CompositeException( new Exception[]{} );
               fail( "Did not throw an IllegalArgumentException" );
           }
           catch ( IllegalArgumentException iae )
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message