Clover coverage report - JFCUnit Test Coverage
Coverage timestamp: Mon Dec 20 2004 23:38:10 MST
file stats: LOC: 66   Methods: 3
NCLOC: 31   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
TestXMLRecording.java 0% 0% 0% 0%
coverage
 1   
 package swingset;
 2   
 
 3   
 import demo.SwingSet;
 4   
 
 5   
 import junit.extensions.xml.XMLTestSuite;
 6   
 import junit.extensions.xml.XMLUtil;
 7   
 import junit.framework.Test;
 8   
 import junit.textui.TestRunner;
 9   
 
 10   
 /**
 11   
  * A class written as an example of how to use the jfcUnit
 12   
  * framework. This class is used to "test" the SwingSet demo
 13   
  * shipped with JDK 1.2.2
 14   
  *
 15   
  * @author <a href="mailto:vraravam@thoughtworks.com">Vijay Aravamudhan : ThoughtWorks Inc.</a>
 16   
  */
 17   
 public class TestXMLRecording extends XMLTestSuite {
 18   
 
 19   
     /** Document factory key. */
 20   
     public static final String DOCUMENT_FACTORY = "javax.xml.parsers.DocumentBuilderFactory";
 21   
 
 22   
     /**
 23   
      * Construct a TestXMLRecording().
 24   
      * Use testSwingSet.xml as the XML test definition.
 25   
      */
 26  0
     public TestXMLRecording() {
 27  0
         super("xmlrecordingtemplate.xml",
 28   
               XMLUtil.readFileFromClassContext(
 29   
                 TestXMLRecording.class,
 30   
                 "xmlrecordingtemplate.xml"));
 31  0
         SwingSet.main(new String[] {});
 32  0
         try {
 33  0
           Thread.currentThread().sleep(3000);
 34   
         } catch (InterruptedException ex) {
 35   
           ; // Ignore
 36   
         }
 37   
     }
 38   
 
 39   
     /**
 40   
      * Create a test suite for this object.
 41   
      * @return Test Suite of tests to be executed.
 42   
      */
 43  0
     public static Test suite() {
 44  0
         return new TestXMLRecording();
 45   
     }
 46   
 
 47   
     /**
 48   
      * Main method to run this class from the command line.
 49   
      * Use the internal parse if available otherwise use the
 50   
      * xerces parser.
 51   
      *
 52   
      * @param args   Command line arguments.
 53   
      */
 54  0
     public static void main(final String[] args) {
 55   
         // Java 1.4 should already be configured for XML.
 56   
         // Or if the user has configured the property use the
 57   
         // Existing property. Otherwise we will assume, that
 58   
         // the Xerces parser will be used.
 59  0
         if (System.getProperty(DOCUMENT_FACTORY) == null) {
 60  0
             System.setProperty(DOCUMENT_FACTORY,
 61   
                 "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
 62   
         }
 63  0
         TestRunner.run((Test) TestXMLRecording.suite());
 64   
     }
 65   
 }
 66