dlr         02/01/11 15:43:22

  Modified:    src/test/org/apache/turbine/pipeline TestPipelineMapper.java
  Log:
  Removed additional layer of indirection introduced by the
  ValveDefinition class in favor of using the Valve interface directly.  This
  simlifies both framework and test code, and XML definitions.
  
  Revision  Changes    Path
  1.4       +11 -14    
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.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- TestPipelineMapper.java   11 Jan 2002 03:38:10 -0000      1.3
  +++ TestPipelineMapper.java   11 Jan 2002 23:43:22 -0000      1.4
  @@ -66,7 +66,8 @@
    * Test Pipeline and valve definitions.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
  - * @version $Id: TestPipelineMapper.java,v 1.3 2002/01/11 03:38:10 dlr Exp $
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Rall</a>
  + * @version $Id: TestPipelineMapper.java,v 1.4 2002/01/11 23:43:22 dlr Exp $
    */
   public class TestPipelineMapper 
       extends TestCase 
  @@ -122,26 +123,22 @@
               // 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", "");
  +            m.setInclusionRule("valve", "");
               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.
  +            // For our test so far we have a pipeline with two Valves.
  +            // Make sure that the XML was consumed correctly and that
  +            // our objects were created accordingly.
               
               assertEquals("TurbineClassicPipeline", p.getName());
  -            
  -            assertEquals("DefaultActionValve",
  -                         p.getValveDefinition(0).getName());
  -            assertEquals("org.apache.turbine.pipeline.DefaultActionValve", 
  -                p.getValveDefinition(0).getClassName());
   
  -            assertEquals("DefaultTargetValve",
  -                         p.getValveDefinition(1).getName());
  -            assertEquals("org.apache.turbine.pipeline.DefaultTargetValve", 
  -                p.getValveDefinition(1).getClassName());
  +            String pkg = "org.apache.turbine.pipeline";
  +            assertEquals(pkg + ".DefaultActionValve",
  +                         p.valves[0].getClass().getName());
  +            assertEquals(pkg + ".DefaultTargetValve",
  +                         p.valves[1].getClass().getName());
           }
           catch (Exception e)
           {
  
  
  

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

Reply via email to