package org.apache.velocity.test;

/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2000 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 acknowlegement:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowlegement may appear in the software itself,
 *    if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
 *    Foundation" must not be used to endorse or promote products derived
 *    from this software without prior written permission. For written
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Group.
 *
 * 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 junit.framework.*;

/**
 * Test suite for Apache Velocity.
 *
 * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
 * @version $Id: VelocityTestSuite.java,v 1.2 2000/10/15 03:21:41 dlr Exp $
 */
public class VelocityTestSuite extends TestSuite
{
    /**
     * Creates an instace of the Apache Velocity test suite.
     */
    public VelocityTestSuite ()
    {
        super("Apache Velocity test suite");

        // Add test cases here.
        addTest(new VelocityTest("Apache Velocity"));
    }
}

@@ -2616,24 +2616,273 @@
 rt j
-unit.framework.*
+ava.util.Properties;%0Aimport java.util.List;%0Aimport java.util.ArrayList;%0Aimport java.util.Iterator;%0Aimport java.io.IOException;%0Aimport java.io.FileInputStream;%0Aimport java.io.BufferedInputStream;%0A%0Aimport junit.framework.*;%0A%0Aimport org.apache.velocity.runtime.Runtime
 ;%0A%0A/
@@ -3033,17 +3033,17 @@
 ava,v 1.
-2
+3
  2000/10
@@ -3047,19 +3047,19 @@
 /10/
-15 03:21:41
+23 06:17:25
  dlr
@@ -3139,238 +3139,1405 @@
   * 
-Creates an instace of the Apache Velocity test suite.%0A     */%0A    public VelocityTestSuite ()%0A    %7B%0A        super(%22Apache Velocity test suite%22);%0A%0A        // Add test cases here.%0A        addTest(new VelocityTest(%22Apache Velocity%22))
+The name of the test suite properties file.%0A     */%0A    private static final String PROPS_FILE_NAME = %22TestSuite.properties%22;%0A%0A    /**%0A     * The test suite properties.%0A     */%0A    private Properties props;%0A%0A    /**%0A     * Creates an instace of the Apache Velocity test suite.%0A     */%0A    public VelocityTestSuite ()%0A    %7B%0A        super(%22Apache Velocity test suite%22);%0A%0A        // Read in properties file.%0A        props = new Properties();%0A        try%0A        %7B%0A            props.load%0A                (new BufferedInputStream(new FileInputStream(PROPS_FILE_NAME)));%0A        %7D%0A        catch (IOException e)%0A        %7B%0A            // TODO: Need to initialize the Runtime first.%0A            Runtime.error(e);%0A        %7D%0A%0A        // Add test cases here.%0A        List templateTestCases = getTemplateTestCases();%0A        for (Iterator iter = templateTestCases.iterator(); iter.hasNext(); )%0A        %7B%0A            addTest(new TemplateTestCase((String)iter.next()));%0A        %7D%0A        addTest(new VelocityTest(%22Apache Velocity%22));%0A    %7D%0A%0A    /**%0A     * Returns a list of the template test cases to run.%0A     *%0A     * @return A %3Ccode%3EList%3C/code%3E of %3Ccode%3EString%3C/code%3E objects naming the %0A     *         test cases.%0A     */%0A    private List getTemplateTestCases ()%0A    %7B%0A        List testCases = new ArrayList();%0A        // TODO: Parse the template test cases from the properties file.%0A        return testCases
 ;%0A  

Load the template test cases (still needs a lot of work).