dlr         02/01/10 19:38:10

  Modified:    src/test/org/apache/turbine/pipeline TestPipelineMapper.java
  Log:
  o Removed now unnecessary constants.
  
  o Adjusted use of Mapper to no longer use the "." inclusion rule for
  valveDefinition (since we're loading from the classpath).
  
  Revision  Changes    Path
  1.3       +7 -20     
jakarta-turbine-3/src/test/org/apache/turbine/pipeline/TestPipelineMapper.java
  
  Index: TestPipelineMapper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-3/src/test/org/apache/turbine/pipeline/TestPipelineMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- TestPipelineMapper.java   3 Jan 2002 04:59:28 -0000       1.2
  +++ TestPipelineMapper.java   11 Jan 2002 03:38:10 -0000      1.3
  @@ -54,7 +54,6 @@
    * <http://www.apache.org/>.
    */
   
  -import java.io.File;
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -67,25 +66,12 @@
    * Test Pipeline and valve definitions.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  - * @version $Id: TestPipelineMapper.java,v 1.2 2002/01/03 04:59:28 dlr Exp $
  + * @version $Id: TestPipelineMapper.java,v 1.3 2002/01/11 03:38:10 dlr Exp $
    */
   public class TestPipelineMapper 
       extends TestCase 
   {
       /**
  -     * Test document which starts the whole mapping process.
  -     */
  -    private static String TEST_DOCUMENT = 
  -        "src/java/org/apache/turbine/pipeline/turbine-classic-pipeline.xml";
  -    
  -    /**
  -     * Test class which is populated with the contents and
  -     * specifications in the test document.
  -     */
  -    private static String TEST_CLASS = 
  -        "org.apache.turbine.pipeline.TurbinePipeline";
  -
  -    /**
        * Constructor
        */
       public TestPipelineMapper(String testName) 
  @@ -136,10 +122,11 @@
               // says that when we encounter a "valveDefinition" element
               // to look in the same directory as the parent XML file
               // for the description of the object to be consumed.
  -            m.setInclusionRule("valveDefinition", ".");
  -            TurbinePipeline p = (TurbinePipeline) m.map(TEST_DOCUMENT,
  -                                                        TEST_CLASS);
  -            
  +            m.setInclusionRule("valveDefinition", "");
  +            TurbinePipeline p =
  +                (TurbinePipeline) m.map(TurbinePipeline.CLASSIC_PIPELINE,
  +                                        TurbinePipeline.class.getName());
  +
               // For our test so far we have a pipeline with two valve
               // definitions. So lets make sure that the XML was consumed
               // correctly and that our objects were created accordingly.
  @@ -155,7 +142,7 @@
                            p.getValveDefinition(1).getName());
               assertEquals("org.apache.turbine.pipeline.DefaultTargetValve", 
                   p.getValveDefinition(1).getClassName());
  -        }            
  +        }
           catch (Exception e)
           {
               e.printStackTrace();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to