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,
org.codehaus.plexus.util.cli.Commandline actualCommand) |
protected void |
assertFile(File root,
String fileName) |
void |
assertPath(String expectedPath,
String actualPath) |
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 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) |
static void |
printSystemCmdUnavail(String cmd,
String testName) |
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, 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 TimeZone GMT_TIME_ZONE
public ScmTestCase()
protected void setUp() throws Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
Exception
protected File getRepositoryRoot()
protected File getRepository()
protected File getWorkingCopy()
protected File getWorkingDirectory()
protected File getAssertionCopy()
protected File getUpdatingCopy()
protected ScmManager getScmManager() throws Exception
Exception
public org.sonatype.plexus.components.sec.dispatcher.SecDispatcher getSecDispatcher() throws Exception
Exception
protected ScmRepository makeScmRepository(String scmUrl) throws Exception
Exception
public void assertPath(String expectedPath, String actualPath) throws Exception
Exception
protected void assertFile(File root, String fileName) throws Exception
Exception
protected 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
IOException
public static void makeFile(File basedir, String fileName, String contents) throws IOException
IOException
protected void deleteDirectory(File directory) throws IOException
IOException
protected static Date getDate(int year, int month, int day, int hourOfDay, int minute, int second, TimeZone tz)
public void assertCommandLine(String expectedCommand, File expectedWorkingDirectory, org.codehaus.plexus.util.cli.Commandline actualCommand) throws IOException
IOException
public static boolean isSystemCmd(String cmd)
cmd
- the executable to run, not null.public static void printSystemCmdUnavail(String cmd, String testName)
Copyright © 2003–2021 The Apache Software Foundation. All rights reserved.