jtaylor     02/03/18 05:19:33

  Modified:    .        build-test.xml
               src/rttest/org/apache/turbine
                        ConditionalValveServletTest.java
  Added:       src/rttest/org/mycompany/newapp/modules/screens
                        JGenTestScreen.java
               src/rttest/testapp/templates/swt JGenTestScreen.swt
  Removed:     src/rttest/org/mycompany/newapp/modules/screens
                        JGenTest.java
               src/rttest/testapp/templates/swt JGenTest.swt
  Log:
  Renamed JGenTest -> JGenTestScreen so it doesn't look like a unit test and
  thus need to be explicately excluded. Also changes build-test.xml to not
  make an intermediate copy (yes modifying the old build process is silly since
  maven is coming, but this was the best way to keep things working IMHO).
  
  Revision  Changes    Path
  1.16      +3 -8      jakarta-turbine-3/build-test.xml
  
  Index: build-test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-3/build-test.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- build-test.xml    18 Mar 2002 03:54:02 -0000      1.15
  +++ build-test.xml    18 Mar 2002 13:19:32 -0000      1.16
  @@ -47,18 +47,14 @@
       
       <ant antfile="build.xml" target="compile"/>
   
  -    <copy todir="${build.src}/org">
  -      <fileset dir="${test.dir}/org"/>
  -      <fileset dir="${rttest.dir}/org"/>
  -    </copy>
  -
  -    <javac srcdir="${build.src}"
  -      destdir="${build.dest}"
  +    <javac destdir="${build.dest}"
         includes="**/*Test.java"
         excludes="**/package.html"
         debug="${debug}"
         deprecation="${deprecation}"
         optimize="${optimize}">
  +      <src path="${test.dir}/org"/>
  +      <src path="${rttest.dir}/org"/>
         <classpath refid="classpath"/>
         <classpath>
           <pathelement path="${build.dest}"/>
  @@ -94,7 +90,6 @@
           <fileset dir="${build.dest}">
             <include name="**/*Test.class"/>
             <exclude name="**/*ServletTest.class"/>
  -          <exclude name="org/mycompany/newapp/modules/screens/JGenTest.class"/>
           </fileset>
         </batchtest>
       </junit>
  
  
  
  1.4       +3 -3      
jakarta-turbine-3/src/rttest/org/apache/turbine/ConditionalValveServletTest.java
  
  Index: ConditionalValveServletTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-3/src/rttest/org/apache/turbine/ConditionalValveServletTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConditionalValveServletTest.java  18 Mar 2002 04:07:50 -0000      1.3
  +++ ConditionalValveServletTest.java  18 Mar 2002 13:19:32 -0000      1.4
  @@ -82,7 +82,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jeff Brekke</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>James Taylor</a>
  - * @version $Id: ConditionalValveServletTest.java,v 1.3 2002/03/18 04:07:50 brekke 
Exp $
  + * @version $Id: ConditionalValveServletTest.java,v 1.4 2002/03/18 13:19:32 jtaylor 
Exp $
    */
   public class ConditionalValveServletTest
       extends ServletTestCase
  @@ -248,14 +248,14 @@
           assertEquals("Test Application JSP Page", theResponse.getTitle());
       }
       
  -        /**
  +    /**
        * This begin runs client side before the testHompage test runs. 
        * We'll set up our simualated url here.
        */
       public void beginJGenPage(WebRequest theRequest)
       {
           theRequest.setURL(null, "/test", "/servlet/test",
  -                          "/template/JGenTest.swt", null);
  +                          "/template/JGenTestScreen.swt", null);
       }
   
       /**
  
  
  
  1.1                  
jakarta-turbine-3/src/rttest/org/mycompany/newapp/modules/screens/JGenTestScreen.java
  
  Index: JGenTestScreen.java
  ===================================================================
  package org.mycompany.newapp.modules.screens;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and 
   *    "Apache Turbine" must not be used to endorse or promote products 
   *    derived from this software without prior written permission. For 
   *    written permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Turbine", nor may "Apache" appear in their name, without 
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  import java.util.HashMap;
   
  import org.apache.turbine.modules.Module;
  import org.apache.turbine.TemplateContext;
  import org.apache.turbine.RunData;
  
  /**
   * Populate the context with some test data for the JGenRenderer test.
   * @author <a href="mailto:[EMAIL PROTECTED]";>James Taylor</a>
   */
  
  public class JGenTestScreen extends Module
  {
      protected void doBuildTemplate( RunData data,
                                       TemplateContext context )
          throws Exception
      {
          context.put( "items", buildItemList() );
      }
      
      public HashMap buildItemList()
      {
          HashMap map = new HashMap();
          
          map.put( "item1", new Item( "this", "is", "just" ) );
          map.put( "item2", new Item( "another", "silly", "test" ) );
          map.put( "item3", new Item( "i", "like", "f00d" ) );
          map.put( "item4", new Item( "f00d", "iz", "g00d" ) );
          
          return map;
      }
      
      /**
       * A trivial little class with which to populate the context.
       */
      public static class Item
      {
          private String value1;
          private String value2;
          private String value3;
          
          public Item( String value1, String value2, String value3 )
          {
              this.value1 = value1;
              this.value2 = value2;
              this.value3 = value3;
          }
          
          public String getValue1()
          {
              return value1;
          }
          
          public String getValue2()
          {
              return value2;
          }
          
          public String getValue3()
          {
              return value3;
          }
      }
  }
  
  
  
  1.1                  
jakarta-turbine-3/src/rttest/testapp/templates/swt/JGenTestScreen.swt
  
        <<Binary file>>
  
  

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

Reply via email to