Make it work for jre < 1.5

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@497230 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kenney Westerhof 2007-01-17 23:06:03 +00:00
parent 89543f6644
commit ce96238b4e
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ public abstract class AbstractMavenIntegrationTestCase
protected void runTest()
throws Throwable
{
String simpleName = getClass().getSimpleName();
String simpleName = getClass().getName();
int idx = simpleName.lastIndexOf( '.' );
simpleName = idx >= 0 ? simpleName.substring( idx + 1 ) : simpleName;
simpleName = simpleName.startsWith( "MavenIT" ) ? simpleName.substring( "MavenIT".length() ) : simpleName;
simpleName = simpleName.endsWith( "Test" ) ? simpleName.substring( 0, simpleName.length() - 4 ) : simpleName;