org.apache.maven.scm
Class ScmTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
org.apache.maven.scm.ScmTestCase
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- ScmTckTestCase
- public abstract class ScmTestCase
- extends org.codehaus.plexus.PlexusTestCase
Base class for all scm tests. Consumers will typically
extend this class while tck test would extend ScmTckTestCase.
This class basically defines default locations for the
test enviroment and implements convenience methods.
- Version:
- $Id: ScmTestCase.java 382376 2006-03-02 13:22:15Z evenisse $
- Author:
- Jason van Zyl
Fields inherited from class org.codehaus.plexus.PlexusTestCase |
basedir, container |
Method Summary |
protected void |
assertFile(java.io.File root,
java.lang.String fileName)
|
void |
assertPath(java.lang.String expectedPath,
java.lang.String actualPath)
TODO This method is bogus. |
protected void |
assertResultIsSuccess(org.apache.maven.scm.ScmResult result)
|
static void |
execute(java.io.File workingDirectory,
java.lang.String executable,
java.lang.String arguments)
|
protected java.io.File |
getAssertionCopy()
|
static java.util.Date |
getDate(int year,
int month,
int day)
|
protected static java.util.Date |
getDate(int year,
int month,
int day,
int hourOfDay,
int minute,
int second,
java.util.TimeZone tz)
|
protected static java.util.Date |
getDate(int year,
int month,
int day,
java.util.TimeZone tz)
|
protected java.lang.String |
getModule()
|
protected java.io.File |
getRepository()
|
protected java.io.File |
getRepositoryRoot()
|
protected org.apache.maven.scm.ScmFileSet |
getScmFileSet()
|
protected org.apache.maven.scm.manager.ScmManager |
getScmManager()
|
protected java.io.File |
getUpdatingCopy()
|
protected java.io.File |
getWorkingCopy()
|
protected java.io.File |
getWorkingDirectory()
Legacy method - same as getWorkingCopy() |
protected static void |
makeDirectory(java.io.File basedir,
java.lang.String fileName)
|
protected static void |
makeFile(java.io.File basedir,
java.lang.String fileName)
|
static void |
makeFile(java.io.File basedir,
java.lang.String fileName,
java.lang.String contents)
|
protected org.apache.maven.scm.repository.ScmRepository |
makeScmRepository(java.lang.String scmUrl)
|
protected static void |
setDebugExecute(boolean debugExecute)
|
protected void |
setUp()
|
Methods inherited from class org.codehaus.plexus.PlexusTestCase |
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GMT_TIME_ZONE
protected static final java.util.TimeZone GMT_TIME_ZONE
ScmTestCase
public ScmTestCase()
setUp
protected void setUp()
throws java.lang.Exception
- Throws:
java.lang.Exception
getModule
protected java.lang.String getModule()
getRepositoryRoot
protected java.io.File getRepositoryRoot()
- Returns:
- default location of the test read/write repository
getRepository
protected java.io.File getRepository()
- Returns:
- Location of the revisioned (read only) repository
getWorkingCopy
protected java.io.File getWorkingCopy()
- Returns:
- location of the working copy (always checkout)
getWorkingDirectory
protected java.io.File getWorkingDirectory()
- Legacy method - same as getWorkingCopy()
- Returns:
- location of the working copy (always checkout)
getAssertionCopy
protected java.io.File getAssertionCopy()
- Returns:
- default location for doing assertions on a working tree
getUpdatingCopy
protected java.io.File getUpdatingCopy()
- Returns:
- default location for doing update operations on a working tree
getScmManager
protected org.apache.maven.scm.manager.ScmManager getScmManager()
throws java.lang.Exception
- Throws:
java.lang.Exception
makeScmRepository
protected org.apache.maven.scm.repository.ScmRepository makeScmRepository(java.lang.String scmUrl)
throws java.lang.Exception
- Throws:
java.lang.Exception
assertPath
public void assertPath(java.lang.String expectedPath,
java.lang.String actualPath)
throws java.lang.Exception
- TODO This method is bogus. ActualPatch is not used and if used, it breaks
some unit tests.
- Throws:
java.lang.Exception
assertFile
protected void assertFile(java.io.File root,
java.lang.String fileName)
throws java.lang.Exception
- Throws:
java.lang.Exception
assertResultIsSuccess
protected void assertResultIsSuccess(org.apache.maven.scm.ScmResult result)
getScmFileSet
protected org.apache.maven.scm.ScmFileSet getScmFileSet()
setDebugExecute
protected static void setDebugExecute(boolean debugExecute)
execute
public static void execute(java.io.File workingDirectory,
java.lang.String executable,
java.lang.String arguments)
throws java.lang.Exception
- Throws:
java.lang.Exception
makeDirectory
protected static void makeDirectory(java.io.File basedir,
java.lang.String fileName)
makeFile
protected static void makeFile(java.io.File basedir,
java.lang.String fileName)
throws java.io.IOException
- Throws:
java.io.IOException
makeFile
public static void makeFile(java.io.File basedir,
java.lang.String fileName,
java.lang.String contents)
throws java.io.IOException
- Throws:
java.io.IOException
getDate
public static java.util.Date getDate(int year,
int month,
int day)
getDate
protected static java.util.Date getDate(int year,
int month,
int day,
java.util.TimeZone tz)
getDate
protected static java.util.Date getDate(int year,
int month,
int day,
int hourOfDay,
int minute,
int second,
java.util.TimeZone tz)
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.