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)
TODO This method is bogus.
|
protected void |
assertResultIsSuccess(ScmResult result) |
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() |
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, tearDown
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
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, format
protected static final TimeZone GMT_TIME_ZONE
protected void setUp() throws Exception
setUp
in class org.codehaus.plexus.PlexusTestCase
Exception
protected String getModule()
protected File getRepositoryRoot()
protected File getRepository()
protected File getWorkingCopy()
protected File getWorkingDirectory()
protected File getAssertionCopy()
protected File getUpdatingCopy()
protected ScmManager getScmManager() throws Exception
Exception
protected ScmRepository makeScmRepository(String scmUrl) throws Exception
Exception
public void assertPath(String expectedPath, String actualPath) 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 makeFile(File basedir, String fileName) throws IOException
IOException
public static void makeFile(File basedir, String fileName, String contents) throws IOException
IOException
public 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)
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.true
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.