org.apache.maven.scm
public abstract class ScmTestCase extends org.codehaus.plexus.PlexusTestCase
Modifier and Type | Field and Description |
---|---|
protected static java.util.TimeZone |
GMT_TIME_ZONE |
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) |
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() |
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 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
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
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 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
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)
public static boolean isSystemCmd(java.lang.String cmd)
cmd
- the executable to run, not null.true
Copyright © 2003-2014. All Rights Reserved.