Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.batik.apps.rasterizer
Class ConfigErrorTest  view ConfigErrorTest download ConfigErrorTest.java

java.lang.Object
  extended byorg.apache.batik.test.AbstractTest
      extended byorg.apache.batik.apps.rasterizer.ConfigErrorTest
All Implemented Interfaces:
SVGConverterController, org.apache.batik.test.Test

class ConfigErrorTest
extends org.apache.batik.test.AbstractTest
implements SVGConverterController

This test lously checks that errors are reported as expected. It checks that the error code given at construction time is reported either my an exception thrown from the execute method or during the processing of single files in the SVGConverterController handler.


Field Summary
static java.lang.String ENTRY_KEY_EXPECTED_ERROR_CODE
           
static java.lang.String ENTRY_KEY_GOT_ERROR_CODE
           
static java.lang.String ERROR_DID_NOT_GET_ERROR
           
static java.lang.String ERROR_UNEXPECTED_ERROR_CODE
           
(package private)  java.lang.String errorCode
           
(package private)  java.lang.String foundErrorCode
           
 
Fields inherited from class org.apache.batik.test.AbstractTest
id, name, parent
 
Constructor Summary
ConfigErrorTest(java.lang.String expectedErrorCode)
           
 
Method Summary
protected  void configure(SVGConverter c)
           
 java.lang.String getName()
          Returns this Test's name.
 void onSourceTranscodingSuccess(SVGConverterSource source, java.io.File dest)
          Invoked when the rasterizer successfully transcoded the input source.
 boolean proceedOnSourceTranscodingFailure(SVGConverterSource source, java.io.File dest, java.lang.String errorCode)
          Invoked when the rasterizer got an error while transcoding the input source.
 boolean proceedWithComputedTask(org.apache.batik.transcoder.Transcoder transcoder, java.util.Map hints, java.util.Vector sources, java.util.Vector dest)
          Invoked when the rasterizer has computed the exact description of what it should do.
 boolean proceedWithSourceTranscoding(SVGConverterSource source, java.io.File dest)
          Invoked when the rasterizer is about to start transcoding of a given source.
 org.apache.batik.test.TestReport runImpl()
          Subclasses should implement this method with the content of the test case.
 
Methods inherited from class org.apache.batik.test.AbstractTest
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, run, runImplBasic, setId, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorCode

java.lang.String errorCode

foundErrorCode

java.lang.String foundErrorCode

ERROR_DID_NOT_GET_ERROR

public static final java.lang.String ERROR_DID_NOT_GET_ERROR
See Also:
Constant Field Values

ERROR_UNEXPECTED_ERROR_CODE

public static final java.lang.String ERROR_UNEXPECTED_ERROR_CODE
See Also:
Constant Field Values

ENTRY_KEY_EXPECTED_ERROR_CODE

public static final java.lang.String ENTRY_KEY_EXPECTED_ERROR_CODE
See Also:
Constant Field Values

ENTRY_KEY_GOT_ERROR_CODE

public static final java.lang.String ENTRY_KEY_GOT_ERROR_CODE
See Also:
Constant Field Values
Constructor Detail

ConfigErrorTest

public ConfigErrorTest(java.lang.String expectedErrorCode)
Method Detail

getName

public java.lang.String getName()
Description copied from class: org.apache.batik.test.AbstractTest
Returns this Test's name.

Specified by:
getName in interface org.apache.batik.test.Test

runImpl

public org.apache.batik.test.TestReport runImpl()
                                         throws java.lang.Exception
Description copied from class: org.apache.batik.test.AbstractTest
Subclasses should implement this method with the content of the test case. Typically, implementations will choose to catch and process all exceptions and error conditions they are looking for in the code they exercise but will let exceptions due to their own processing propagate.


configure

protected void configure(SVGConverter c)

proceedWithComputedTask

public boolean proceedWithComputedTask(org.apache.batik.transcoder.Transcoder transcoder,
                                       java.util.Map hints,
                                       java.util.Vector sources,
                                       java.util.Vector dest)
Description copied from interface: SVGConverterController
Invoked when the rasterizer has computed the exact description of what it should do. The controller should return true if the transcoding process should proceed or false otherwise.

Specified by:
proceedWithComputedTask in interface SVGConverterController

proceedWithSourceTranscoding

public boolean proceedWithSourceTranscoding(SVGConverterSource source,
                                            java.io.File dest)
Description copied from interface: SVGConverterController
Invoked when the rasterizer is about to start transcoding of a given source. The controller should return true if the source should be transcoded and false otherwise.

Specified by:
proceedWithSourceTranscoding in interface SVGConverterController

proceedOnSourceTranscodingFailure

public boolean proceedOnSourceTranscodingFailure(SVGConverterSource source,
                                                 java.io.File dest,
                                                 java.lang.String errorCode)
Description copied from interface: SVGConverterController
Invoked when the rasterizer got an error while transcoding the input source. The controller should return true if the transcoding process should continue on other sources and it should return false if it should not.

Specified by:
proceedOnSourceTranscodingFailure in interface SVGConverterController

onSourceTranscodingSuccess

public void onSourceTranscodingSuccess(SVGConverterSource source,
                                       java.io.File dest)
Description copied from interface: SVGConverterController
Invoked when the rasterizer successfully transcoded the input source.

Specified by:
onSourceTranscodingSuccess in interface SVGConverterController