KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > project > inheritance > AbstractProjectInheritanceTestCase


1 package org.apache.maven.project.inheritance;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.maven.project.AbstractMavenProjectTestCase;
20
21 import java.io.File JavaDoc;
22
23 /**
24  * @author <a HREF="mailto:jason@maven.org">Jason van Zyl</a>
25  * @version $Id: AbstractProjectInheritanceTestCase.java 240178 2005-08-26 07:31:18Z brett $
26  */

27 public abstract class AbstractProjectInheritanceTestCase
28     extends AbstractMavenProjectTestCase
29 {
30     protected String JavaDoc getTestSeries()
31     {
32         String JavaDoc className = getClass().getPackage().getName();
33
34         return className.substring( className.lastIndexOf( "." ) + 1 );
35     }
36
37     protected File JavaDoc projectFile( String JavaDoc name )
38     {
39         return new File JavaDoc( getLocalRepositoryPath(), "/maven/poms/" + name + "-1.0.pom" );
40     }
41
42     // ----------------------------------------------------------------------
43
// The local repository for this category of tests
44
// ----------------------------------------------------------------------
45

46     protected File JavaDoc getLocalRepositoryPath()
47     {
48         return getTestFile( "src/test/resources/inheritance-repo/" + getTestSeries() );
49     }
50 }
51
Popular Tags