public abstract class ScmTestCase
extends org.codehaus.plexus.PlexusTestCase
Modifier and Type | Field and Description |
---|---|
private static boolean |
debugExecute |
protected static java.util.TimeZone |
GMT_TIME_ZONE |
private ScmManager |
scmManager |
private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher |
secDispatcher |
Constructor and Description |
---|
ScmTestCase() |
Modifier and Type | Method and Description |
---|---|
void |
assertCommandLine(java.lang.String expectedCommand,
java.io.File expectedWorkingDirectory,
org.codehaus.plexus.util.cli.Commandline actualCommand) |
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(ScmResult result) |
protected void |
deleteDirectory(java.io.File directory) |
static void |
execute(java.io.File workingDirectory,
java.lang.String executable,
java.lang.String arguments)
Execute the command line
|
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 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 java.io.File |
getUpdatingCopy() |
protected java.io.File |
getWorkingCopy() |
protected java.io.File |
getWorkingDirectory()
Legacy method - same as getWorkingCopy()
|
static boolean |
isSystemCmd(java.lang.String cmd) |
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 ScmRepository |
makeScmRepository(java.lang.String scmUrl) |
protected void |
printOutputError(ScmResult result) |
protected static void |
setDebugExecute(boolean debugExecute) |
protected void |
setUp() |
customizeComponentConfiguration, customizeContainerConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer, tearDown
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
protected static final java.util.TimeZone GMT_TIME_ZONE
private static boolean debugExecute
private ScmManager scmManager
private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher secDispatcher
protected void setUp() throws java.lang.Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
java.lang.Exception
protected java.lang.String getModule()
protected java.io.File getRepositoryRoot()
protected java.io.File getRepository()
protected java.io.File getWorkingCopy()
protected java.io.File getWorkingDirectory()
protected java.io.File getAssertionCopy()
protected java.io.File getUpdatingCopy()
protected ScmManager getScmManager() throws java.lang.Exception
java.lang.Exception
public org.sonatype.plexus.components.sec.dispatcher.SecDispatcher getSecDispatcher() throws java.lang.Exception
java.lang.Exception
protected ScmRepository makeScmRepository(java.lang.String scmUrl) throws java.lang.Exception
java.lang.Exception
public void assertPath(java.lang.String expectedPath, java.lang.String actualPath) throws java.lang.Exception
java.lang.Exception
protected void assertFile(java.io.File root, java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
protected void assertResultIsSuccess(ScmResult result)
protected void printOutputError(ScmResult result)
protected ScmFileSet getScmFileSet()
protected static void setDebugExecute(boolean debugExecute)
public static void execute(java.io.File workingDirectory, java.lang.String executable, java.lang.String arguments) throws java.lang.Exception
workingDirectory
- not nullexecutable
- not null, should be a system commandarguments
- not nulljava.lang.Exception
- if anyCommandLineUtils.executeCommandLine(Commandline, org.codehaus.plexus.util.cli.StreamConsumer,
org.codehaus.plexus.util.cli.StreamConsumer)
protected static void makeDirectory(java.io.File basedir, java.lang.String fileName)
protected static void makeFile(java.io.File basedir, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static void makeFile(java.io.File basedir, java.lang.String fileName, java.lang.String contents) throws java.io.IOException
java.io.IOException
protected void deleteDirectory(java.io.File directory) throws java.io.IOException
java.io.IOException
public static java.util.Date getDate(int year, int month, int day)
protected static java.util.Date getDate(int year, int month, int day, java.util.TimeZone tz)
protected static java.util.Date getDate(int year, int month, int day, int hourOfDay, int minute, int second, java.util.TimeZone tz)
public void assertCommandLine(java.lang.String expectedCommand, java.io.File expectedWorkingDirectory, org.codehaus.plexus.util.cli.Commandline actualCommand) throws java.io.IOException
java.io.IOException
public static boolean isSystemCmd(java.lang.String cmd)
cmd
- the executable to run, not null.true