public abstract class ScmTestCase extends org.codehaus.plexus.PlexusTestCase
| Modifier and Type | Field and Description |
|---|---|
protected static TimeZone |
GMT_TIME_ZONE |
| Constructor and Description |
|---|
ScmTestCase() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertCommandLine(String expectedCommand,
File expectedWorkingDirectory,
Commandline actualCommand) |
protected void |
assertFile(File root,
String fileName) |
void |
assertPath(String expectedPath,
String actualPath)
TODO This method is bogus.
|
protected void |
assertResultIsSuccess(ScmResult result) |
protected void |
deleteDirectory(File directory) |
static void |
execute(File workingDirectory,
String executable,
String arguments)
Execute the command line
|
protected File |
getAssertionCopy() |
static Date |
getDate(int year,
int month,
int day) |
protected static Date |
getDate(int year,
int month,
int day,
int hourOfDay,
int minute,
int second,
TimeZone tz) |
protected static Date |
getDate(int year,
int month,
int day,
TimeZone tz) |
protected String |
getModule() |
protected File |
getRepository() |
protected File |
getRepositoryRoot() |
protected ScmFileSet |
getScmFileSet() |
protected ScmManager |
getScmManager() |
org.sonatype.plexus.components.sec.dispatcher.SecDispatcher |
getSecDispatcher()
If you wish to use this component, make sure to configure your
TCK implementation to include plexus component configuration
as doc at https://issues.apache.org/jira/browse/MNG-4384
|
protected File |
getUpdatingCopy() |
protected File |
getWorkingCopy() |
protected File |
getWorkingDirectory()
Legacy method - same as getWorkingCopy()
|
static boolean |
isSystemCmd(String cmd) |
protected static void |
makeDirectory(File basedir,
String fileName) |
protected static void |
makeFile(File basedir,
String fileName) |
static void |
makeFile(File basedir,
String fileName,
String contents) |
protected ScmRepository |
makeScmRepository(String scmUrl) |
protected void |
printOutputError(ScmResult result) |
protected static void |
setDebugExecute(boolean debugExecute) |
protected void |
setUp() |
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDownassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected static final TimeZone GMT_TIME_ZONE
public ScmTestCase()
protected void setUp() throws Exception
setUp in class org.codehaus.plexus.PlexusTestCaseExceptionprotected File getRepositoryRoot()
protected File getRepository()
protected File getWorkingCopy()
protected File getWorkingDirectory()
protected File getAssertionCopy()
protected File getUpdatingCopy()
protected ScmManager getScmManager() throws Exception
Exceptionpublic org.sonatype.plexus.components.sec.dispatcher.SecDispatcher getSecDispatcher() throws Exception
Exceptionprotected ScmRepository makeScmRepository(String scmUrl) throws Exception
Exceptionpublic void assertPath(String expectedPath, String actualPath) throws Exception
Exceptionprotected void assertFile(File root, String fileName) throws Exception
Exceptionprotected void assertResultIsSuccess(ScmResult result)
protected void printOutputError(ScmResult result)
protected ScmFileSet getScmFileSet()
protected static void setDebugExecute(boolean debugExecute)
public static void execute(File workingDirectory, String executable, String arguments) throws Exception
workingDirectory - not nullexecutable - not null, should be a system commandarguments - not nullException - if anyCommandLineUtils.executeCommandLine(Commandline, org.codehaus.plexus.util.cli.StreamConsumer,
org.codehaus.plexus.util.cli.StreamConsumer)protected static void makeDirectory(File basedir, String fileName)
protected static void makeFile(File basedir, String fileName) throws IOException
IOExceptionpublic static void makeFile(File basedir, String fileName, String contents) throws IOException
IOExceptionprotected void deleteDirectory(File directory) throws IOException
IOExceptionprotected static Date getDate(int year, int month, int day, int hourOfDay, int minute, int second, TimeZone tz)
public void assertCommandLine(String expectedCommand, File expectedWorkingDirectory, Commandline actualCommand) throws IOException
IOExceptionpublic static boolean isSystemCmd(String cmd)
cmd - the executable to run, not null.trueCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.