geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <jlaskow...@apache.org>
Subject Re: cvs commit: incubator-geronimo/sandbox/webdav/src/test/org/apache/geronimo/datastore/impl/remote RemoteUseCaseTest.java
Date Sun, 29 Feb 2004 17:14:53 GMT
gdamour@apache.org wrote:
> gdamour     2004/02/29 05:14:11
...
>   1.1                  incubator-geronimo/sandbox/webdav/src/test/org/apache/geronimo/datastore/Util.java
...
>   package org.apache.geronimo.datastore;
>   
>   import java.io.File;
>   import java.io.IOException;
>   
>   /**
>    *
>    * @version $Revision: 1.1 $ $Date: 2004/02/29 13:14:11 $
>    */
>   public class Util {
>       
>       public static void recursiveDelete(File aRoot) throws IOException {

The method already exists in 
./modules/deployment/src/java/org/apache/geronimo/deployment/util/FileUtil.java. 


That rises a very interesting question - where do we put methods/classes 
that are common to several modules?

>           Exception ex = null;
>           try {
>               dirtyMarker.setIsDelete(true);
>           } catch (IllegalArgumentException e) {
>               ex = e;
>           }
>           assertNotNull("Transition should ne impossible", ex);

Why do you check whether or not ex is not null that way? Unless I'm 
mistaken, it boils down to the following junit pattern:

  try
  {
    dirtyMarker.setIsDelete(true);
    fail("Transition should not be impossible; IllegalArgumentException 
expected");
  } catch (IllegalArgumentException expected) {
  }

There's also a typo in the message - 'should ne impossible' == 'should 
not be possible'.

Cheers,
Jacek

Mime
View raw message