You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2004/01/08 10:37:30 UTC

cvs commit: cocoon-lenya/src/test/org/apache/lenya/cms/rc RevisionControllerTest.java

egli        2004/01/08 01:37:30

  Modified:    src/test/org/apache/lenya/cms/rc RevisionControllerTest.java
  Log:
  Removed unused variable.
  
  Revision  Changes    Path
  1.3       +58 -61    cocoon-lenya/src/test/org/apache/lenya/cms/rc/RevisionControllerTest.java
  
  Index: RevisionControllerTest.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/test/org/apache/lenya/cms/rc/RevisionControllerTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RevisionControllerTest.java	31 Jul 2003 11:56:42 -0000	1.2
  +++ RevisionControllerTest.java	8 Jan 2004 09:37:30 -0000	1.3
  @@ -59,7 +59,6 @@
   
   import java.io.FileNotFoundException;
   
  -import java.io.File;
   import java.io.IOException;
   
   /**
  @@ -80,70 +79,68 @@
        * @param args The command-line arguments.
        */
       public static void main(String[] args) {
  - //       TestRunner.run(getSuite());
  +        //       TestRunner.run(getSuite());
   
  -				if (args.length != 4) {
  -					System.out.println("Usage: " + new RevisionController().getClass().getName() +
  -						" username(user who checkout) source(filename without the rootDirectory of the document to checkout) username(user who checkin) destination(filename without the rootDirectory of document to checkin)");
  -
  -					return;
  -				}
  -
  -				String identityS = args[0];
  -				String source = args[1];
  -				String identityD = args[2];
  -				String destination = args[3];
  -				RevisionController rc = new RevisionController();
  -				File in = null;
  -
  -				try {
  -					in = rc.reservedCheckOut(source, identityS);
  -				} catch (FileNotFoundException e) // No such source file
  -				 {
  -					System.out.println(e.toString());
  -				} catch (FileReservedCheckOutException e) // Source has been checked out already
  -				 {
  -					System.out.println(e.toString());
  -				//	System.out.println(error(e.source + "is already check out by " + e.checkOutUsername + " since " +						e.checkOutDate));
  -					return;
  -
  -				} catch (IOException e) { // Cannot create rcml file
  -					System.out.println(e.toString());
  -					return;
  -
  -				} catch (Exception e) {
  -					System.out.println(e.toString());
  -					return;
  -				}
  -
  -				try {
  -					rc.reservedCheckIn(destination, identityD, true);
  -				} catch (FileReservedCheckInException e) {
  -					System.out.println(e.toString());
  -				} catch (Exception e) {
  -					System.out.println(e.toString());
  -				}
  -			}
  +        if (args.length != 4) {
  +            System.out.println(
  +                "Usage: "
  +                    + new RevisionController().getClass().getName()
  +                    + " username(user who checkout) source(filename without the rootDirectory of the document to checkout) username(user who checkin) destination(filename without the rootDirectory of document to checkin)");
   
  +            return;
  +        }
   
  - /*   protected static final Class[] classes = {
  -    };
  -
  -    /**
  -     * Creates a test suite.
  -     * @return a test suite.
  -     */
  -/*    public static Test getSuite() {
  -        TestSuite suite = new TestSuite();
  -
  -        for (int i = 0; i < classes.length; i++) {
  -            suite.addTestSuite(classes[i]);
  +        String identityS = args[0];
  +        String source = args[1];
  +        String identityD = args[2];
  +        String destination = args[3];
  +        RevisionController rc = new RevisionController();
  +        try {
  +            rc.reservedCheckOut(source, identityS);
  +        } catch (FileNotFoundException e) // No such source file
  +            {
  +            System.out.println(e.toString());
  +        } catch (FileReservedCheckOutException e) // Source has been checked out already
  +            {
  +            System.out.println(e.toString());
  +            //	System.out.println(error(e.source + "is already check out by " + e.checkOutUsername + " since " +						e.checkOutDate));
  +            return;
  +
  +        } catch (IOException e) { // Cannot create rcml file
  +            System.out.println(e.toString());
  +            return;
  +
  +        } catch (Exception e) {
  +            System.out.println(e.toString());
  +            return;
           }
   
  -        return suite;
  +        try {
  +            rc.reservedCheckIn(destination, identityD, true);
  +        } catch (FileReservedCheckInException e) {
  +            System.out.println(e.toString());
  +        } catch (Exception e) {
  +            System.out.println(e.toString());
  +        }
       }
  -*/
  +
  +    /*   protected static final Class[] classes = {
  +       };
  +    
  +       /**
  +        * Creates a test suite.
  +        * @return a test suite.
  +        */
  +    /*    public static Test getSuite() {
  +            TestSuite suite = new TestSuite();
  +    
  +            for (int i = 0; i < classes.length; i++) {
  +                suite.addTestSuite(classes[i]);
  +            }
  +    
  +            return suite;
  +        }
  +    */
       /** @see junit.framework.TestCase#setUp() */
  -    protected void setUp() throws Exception {
  -    }
  +    protected void setUp() throws Exception {}
   }
  
  
  

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