You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by vh...@apache.org on 2001/04/11 01:27:44 UTC

cvs commit: xml-batik/test-sources/org/apache/batik/test/xml XMLTestReportProcessor.java

vhardy      01/04/10 16:27:43

  Modified:    test-resources/org/apache/batik/test/xml/resources
                        Messages.properties
               test-sources/org/apache/batik/test/xml
                        XMLTestReportProcessor.java
  Log:
  Fixed testSuite.xml and improved error message
  
  Revision  Changes    Path
  1.2       +6 -2      xml-batik/test-resources/org/apache/batik/test/xml/resources/Messages.properties
  
  Index: Messages.properties
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/xml/resources/Messages.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Messages.properties	2001/04/10 22:04:57	1.1
  +++ Messages.properties	2001/04/10 23:27:40	1.2
  @@ -19,10 +19,10 @@
   .xml
   
   XMLTestReportProcessor.config.xml.test.report.default.directory = \
  -c:\\work\\doc\\svg\\apache\\xml-batik\\regard\\xml
  +regard/xml
   
   XMLTestReportProcessor.config.xml.test.report.resources.default.directory = \
  -c:\\work\\doc\\svg\\apache\\xml-batik\\regard\\xml\\resources
  +regard/xml/resources
   
   #
   # Messages
  @@ -49,6 +49,10 @@
   
   XMLTestSuiteRunner.messages.error.running.test.suite = \
   Error while running test suite : {0}
  +
  +XMLTestReportProcessor.messages.error.report.directory.does.not.exist = \
  +Report directory "{0}" specified in resource file org.apache.batik.test.xml.Messages.properties \
  +does not exist.
   
   #
   # Config: XML Parser
  
  
  
  1.2       +15 -2     xml-batik/test-sources/org/apache/batik/test/xml/XMLTestReportProcessor.java
  
  Index: XMLTestReportProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-sources/org/apache/batik/test/xml/XMLTestReportProcessor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLTestReportProcessor.java	2001/04/10 22:10:34	1.1
  +++ XMLTestReportProcessor.java	2001/04/10 23:27:42	1.2
  @@ -44,7 +44,7 @@
    * used by the object can be configured at creation time.
    *
    * @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a>
  - * @version $Id: XMLTestReportProcessor.java,v 1.1 2001/04/10 22:10:34 vhardy Exp $
  + * @version $Id: XMLTestReportProcessor.java,v 1.2 2001/04/10 23:27:42 vhardy Exp $
    */
   public class XMLTestReportProcessor 
       implements TestReportProcessor,
  @@ -79,6 +79,13 @@
        */
       public static final String XML_TEST_REPORT_RESOURCES_DEFAULT_DIRECTORY 
           = Messages.formatMessage("XMLTestReportProcessor.config.xml.test.report.resources.default.directory", null);
  +								 
  +    /**
  +     * Error message if report directory does not exist.
  +     */
  +    public static final String REPORT_DIRECTORY_DOES_NOT_EXIST
  +        = "XMLTestReportProcessor.messages.error.report.directory.does.not.exist";
  +								 
   
       /**
        * Recursively processes the input <tt>TestReport</tt> and
  @@ -123,7 +130,13 @@
        */
       public File getReportDirectory()
           throws IOException {
  -        return new File(XML_TEST_REPORT_DEFAULT_DIRECTORY);
  +        File file = new File(XML_TEST_REPORT_DEFAULT_DIRECTORY);
  +				if( !file.exists() ){
  +					throw new IOException(Messages.formatMessage(REPORT_DIRECTORY_DOES_NOT_EXIST, 
  +																											new Object[]{XML_TEST_REPORT_DEFAULT_DIRECTORY}));
  +				}
  +
  +				return file;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org