public abstract class ScmTckTestCase extends ScmTestCase
Basically all it does is to setup a default test enviroment common for all tck tests. The default setup includes:
GMT_TIME_ZONE
testName
Constructor and Description |
---|
ScmTckTestCase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addToWorkingTree(File workingDirectory,
File file,
ScmRepository repository)
Convenience method to add a file to the working tree at the working directory
|
protected CheckInScmResult |
checkIn(File workingDirectory,
ScmRepository repository)
Convenience method to check in files to the repository
|
protected CheckOutScmResult |
checkOut(File workingDirectory,
ScmRepository repository)
Convenience method to check out files from the repository
|
void |
checkScmPresence() |
protected EditScmResult |
edit(File basedir,
String includes,
String excludes,
ScmRepository repository) |
protected List<String> |
getScmFileNames()
Get the list of file names that is supposed to be in the test repo.
|
String |
getScmProviderCommand()
Some tests can only run if the appropriate application has been installed.
|
protected ScmRepository |
getScmRepository()
Convenience method to get the ScmRepository for this provider
|
abstract String |
getScmUrl() |
abstract void |
initRepo()
Initialize repository at the
getScmUrl() location with the files in getScmFileNames() |
protected Map<String,ScmFile> |
mapFilesByPath(List<ScmFile> files)
take the files of the given list, add them to a TreeMap and
use the pathName String as key for the Map.
|
protected RemoveScmResult |
remove(File workingDirectory,
ScmRepository repository)
Convenience method to remove files from the repository
|
void |
removeRepo()
This method is available to those SCM clients that need to perform
a cleanup at the end of the tests.
|
void |
setUp() |
void |
tearDown()
Provided to allow removeRepo() to be called.
|
assertCommandLine, assertFile, assertPath, assertResultIsSuccess, checkScmPresence, customizeContainerConfiguration, deleteDirectory, execute, getAssertionCopy, getDate, getDate, getDate, getRepository, getRepositoryRoot, getScmFileSet, getScmManager, getUpdatingCopy, getWorkingCopy, getWorkingDirectory, isSystemCmd, makeDirectory, makeFile, makeFile, makeScmRepository, printOutputError, setDebugExecute
customizeComponentConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getCustomModules, getName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, lookupMap, release, setupContainer
public ScmTckTestCase()
public String getScmProviderCommand()
public abstract String getScmUrl() throws Exception
Exception
- if anyprotected List<String> getScmFileNames()
Get the list of file names that is supposed to be in the test repo.
public abstract void initRepo() throws Exception
Initialize repository at the getScmUrl()
location with the files in getScmFileNames()
The setup is also asserting on the existence of these files.
This should only be used by this class (thus do not call this method from derived classes)
Exception
- if anypublic void checkScmPresence()
public void setUp() throws Exception
setUp
in class ScmTestCase
Exception
public void removeRepo() throws Exception
Exception
public void tearDown() throws Exception
tearDown
in class PlexusJUnit4TestCase
Exception
protected ScmRepository getScmRepository() throws Exception
Exception
protected CheckOutScmResult checkOut(File workingDirectory, ScmRepository repository) throws Exception
Exception
protected CheckInScmResult checkIn(File workingDirectory, ScmRepository repository) throws Exception
Exception
protected RemoveScmResult remove(File workingDirectory, ScmRepository repository) throws Exception
Exception
protected void addToWorkingTree(File workingDirectory, File file, ScmRepository repository) throws Exception
Exception
protected Map<String,ScmFile> mapFilesByPath(List<ScmFile> files)
files
- List with ScmFile
sprotected EditScmResult edit(File basedir, String includes, String excludes, ScmRepository repository) throws Exception
Exception
Copyright © 2003–2024 The Apache Software Foundation. All rights reserved.