The im4java Library, Version 1.4.0

org.im4java.test
Class TestCase23

java.lang.Object
  extended by org.im4java.test.AbstractTestCase
      extended by org.im4java.test.TestCase23
All Implemented Interfaces:
ProcessEventListener, TestCase

public class TestCase23
extends AbstractTestCase
implements ProcessEventListener

This class implements a test for chaining commands via im4java (i.e. piping the output of one im4java-command to a second).

Note that chaining is inherent complex, because you have to take care of closing the pipe between commands yourself in case of errors. If you pipe commands on the commandline, the shell takes care of this and you don't have to care about it, but with java, it's different.

Since:
1.2.0
Version:
$Revision: 1.3 $
Author:
$Author: bablokb $

Field Summary
 
Fields inherited from class org.im4java.test.AbstractTestCase
iArgs, iImageDir, iTmpImage
 
Constructor Summary
TestCase23()
           
 
Method Summary
 java.lang.String getDescription()
          Return the description of the test.
static void main(java.lang.String[] args)
          Main method.
 void processInitiated(ProcessEvent pEvent)
          This method is called at process initiation.
 void processStarted(ProcessEvent pEvent)
          This method is called at process startup.
 void processTerminated(ProcessEvent pEvent)
          This method is called at normal or abnormal process termination.
 void run()
          Run the test.
 
Methods inherited from class org.im4java.test.AbstractTestCase
runTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCase23

public TestCase23()
Method Detail

getDescription

public java.lang.String getDescription()
Return the description of the test.

Specified by:
getDescription in interface TestCase

main

public static void main(java.lang.String[] args)
Main method. Just calls AbstractTestCase.runTest(), which catches and prints exceptions.


run

public void run()
         throws java.lang.Exception
Run the test.

Specified by:
run in interface TestCase
Throws:
java.lang.Exception

processInitiated

public void processInitiated(ProcessEvent pEvent)
This method is called at process initiation.

Specified by:
processInitiated in interface ProcessEventListener

processStarted

public void processStarted(ProcessEvent pEvent)
This method is called at process startup.

Specified by:
processStarted in interface ProcessEventListener

processTerminated

public void processTerminated(ProcessEvent pEvent)
This method is called at normal or abnormal process termination.

Specified by:
processTerminated in interface ProcessEventListener

The im4java Library, Version 1.4.0

Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/