plynch 2002/06/27 11:05:14 Added: src/test/java/org/apache/maven TestConstantsTest.java Log: A new file that stores test related constants. Revision Changes Path 1.1 jakarta-turbine-maven/src/test/java/org/apache/maven/TestConstantsTest.java Index: TestConstantsTest.java =================================================================== package org.apache.maven; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 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 Maven" 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 Maven", 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 junit.framework.TestCase; /** * A class used to hold static commonly used data needed when running * tests. This is also a test to make sure that * System.getProperty("file.separator") returns not null. * * @author <a href="mailto:[EMAIL PROTECTED]>Peter Lynch</a> */ public class TestConstantsTest extends TestCase { private static final String fs = System.getProperty("file.separator"); /** * A reference to the source path from the project root * where all the test sources can be found. * Contains a leading file separator */ public static final String TEST_DIR = fs + "src" + fs + "test"; /** * A reference to the source path from the project root * where test resources for the build package can be found. * The value ends in a file seperator. */ public static final String BUILD_DIR = TEST_DIR + fs + "build" + fs; /** * A reference to the source path from the project root * where test resources for the cvslib package can be found. * The value ends in a file seperator. */ public static final String CVSLIB_DIR = TEST_DIR + fs + "cvslib" + fs; /** * A reference to the source path from the project root * where test resources for the build package can be found. * The value ends in a file seperator. */ public static final String DEPENDENCY_DIR = TEST_DIR + fs + "dependency" + fs; /** * A reference to the source path from the project root * where test resources for the importscrubber package can be found. * The value ends in a file seperator. */ public static final String IMPORTSCRUBBER_DIR = TEST_DIR + fs + "importscrubber" + fs; /** * A reference to the source path from the project root * where j2ee test resurces can be found. * The value ends in a file seperator. */ public static final String J2EE_DIR = TEST_DIR + fs + "j2ee" + fs; /** * A reference to the source path from the project root * where java test resources can be found. * The value ends in a file seperator. */ public static final String JAVA_DIR = TEST_DIR + fs + "java" + fs; /** * A reference to the source path from the project root * where java-parser test resources can be found. * The value ends in a file seperator. */ public static final String JAVA_PARSER_DIR = TEST_DIR + fs + "java-parser" + fs; /** * A reference to the source path from the project root * where reactor test resources can be found. * The value ends in a file seperator. */ public static final String REACTOR_DIR = TEST_DIR + fs + "reactor" + fs; /** * A reference to the source path from the project root * where struts test resources can be found. * The value ends in a file seperator. */ public static final String STRUTS_DIR = TEST_DIR + fs + "struts" + fs; /** * A reference to the source path from the project root * where transformer test resources can be found. * The value ends in a file seperator. */ public static final String TRANSFORMER_DIR = TEST_DIR + fs + "transformer" + fs; /** * A reference to the source path from the project root * where xslt test resources can be found. * The value ends in a file seperator. */ public static final String XSLT_DIR = TEST_DIR + fs + "xslt" + fs; /** * Creates a new instance of the test case * * @param testName the name of the test */ public TestConstantsTest(String testName) { super(testName); } /** * test that the constants hold valid values */ public void testConstants() { assertNotNull("System.getProperty('file.separator') can't be null.", fs); } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
