Clover coverage report - JFCUnit Test Coverage
Coverage timestamp: Mon Dec 20 2004 23:38:10 MST
file stats: LOC: 71   Methods: 4
NCLOC: 33   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
SuiteTagHandlerT.java - 100% 100% 100%
coverage
 1   
 package junit.extensions.xml.elements;
 2   
 
 3   
 import org.w3c.dom.Element;
 4   
 import junit.extensions.xml.IXMLTestSuite;
 5   
 import junit.extensions.xml.XMLException;
 6   
 import junit.framework.TestCase;
 7   
 import junit.extensions.xml.XMLTagResourceBundle;
 8   
 
 9   
 /**
 10   
  * <p>Title: Test the SuiteTagHandler.</p>
 11   
  * <p>Copyright: Copyright (c) 2003</p>
 12   
  * <p>Company: JFCUnit OpenSource Project</p>
 13   
  * @author Kevin Wilson
 14   
  * @version 1.0
 15   
  */
 16   
 public class SuiteTagHandlerT extends TestCase {
 17   
   /**
 18   
    * suite tag handler.
 19   
    */
 20   
   private SuiteTagHandler m_suiteTagHandler = null;
 21   
   /**
 22   
    * element fixture.
 23   
    */
 24   
   private ElementFixture m_fixture;
 25   
 
 26   
   /**
 27   
    * Setup the test.
 28   
    * @throws Exception may be thrown.
 29   
    */
 30  2
   protected void setUp() throws Exception {
 31  2
     super.setUp();
 32  2
     m_fixture = new ElementFixture(this);
 33   
 
 34  2
     m_fixture.setUp();
 35   
   }
 36   
 
 37   
   /**
 38   
    * tear down the test.
 39   
    * @throws Exception may be thrown.
 40   
    */
 41  2
   protected void tearDown() throws Exception {
 42  2
     m_suiteTagHandler = null;
 43  2
     m_fixture.tearDown();
 44   
 
 45  2
     m_fixture = null;
 46  2
     super.tearDown();
 47   
   }
 48   
 
 49   
 
 50   
   /**
 51   
    * Test the process element.
 52   
    * @throws XMLException may be thrown.
 53   
    */
 54  1
   public void testProcessElement() throws XMLException {
 55  1
     Element suite = m_fixture.getSuiteElement();
 56  1
     IXMLTestSuite testSuite = m_fixture.getTestSuite();
 57  1
     m_suiteTagHandler = new SuiteTagHandler(suite, testSuite);
 58  1
     m_suiteTagHandler.processElement();
 59   
   }
 60   
 
 61   
   /**
 62   
    * Test with the Tag lookup.
 63   
    */
 64  1
   public void testLookup() {
 65  1
     Element suite = m_fixture.getSuiteElement();
 66  1
     IXMLTestSuite testSuite = m_fixture.getTestSuite();
 67  1
     Object o = XMLTagResourceBundle.getTagHandler(suite, testSuite, "suite");
 68  1
     assertNotNull(o);
 69   
   }
 70   
 }
 71