org.apache.maven.scm

Class ScmTestCase

public abstract class ScmTestCase extends PlexusTestCase

Base class for all scm tests. Consumers will typically extend this class while tck test would extend ScmTckTestCase.
This class basically defines default locations for the test enviroment and implements convenience methods.

Version: $Id: ScmTestCase.java 382376 2006-03-02 13:22:15Z evenisse $

Author: Jason van Zyl

Field Summary
protected static TimeZoneGMT_TIME_ZONE
Method Summary
protected voidassertFile(File root, String fileName)
voidassertPath(String expectedPath, String actualPath)
TODO This method is bogus.
protected voidassertResultIsSuccess(ScmResult result)
static voidexecute(File workingDirectory, String executable, String arguments)
protected FilegetAssertionCopy()
static DategetDate(int year, int month, int day)
protected static DategetDate(int year, int month, int day, TimeZone tz)
protected static DategetDate(int year, int month, int day, int hourOfDay, int minute, int second, TimeZone tz)
protected StringgetModule()
protected FilegetRepository()
protected FilegetRepositoryRoot()
protected ScmFileSetgetScmFileSet()
protected ScmManagergetScmManager()
protected FilegetUpdatingCopy()
protected FilegetWorkingCopy()
protected FilegetWorkingDirectory()
Legacy method - same as getWorkingCopy()
protected static voidmakeDirectory(File basedir, String fileName)
protected static voidmakeFile(File basedir, String fileName)
static voidmakeFile(File basedir, String fileName, String contents)
protected ScmRepositorymakeScmRepository(String scmUrl)
protected static voidsetDebugExecute(boolean debugExecute)
protected voidsetUp()

Field Detail

GMT_TIME_ZONE

protected static final TimeZone GMT_TIME_ZONE

Method Detail

assertFile

protected void assertFile(File root, String fileName)

assertPath

public void assertPath(String expectedPath, String actualPath)
TODO This method is bogus. ActualPatch is not used and if used, it breaks some unit tests.

assertResultIsSuccess

protected void assertResultIsSuccess(ScmResult result)

execute

public static void execute(File workingDirectory, String executable, String arguments)

getAssertionCopy

protected File getAssertionCopy()

Returns: default location for doing assertions on a working tree

getDate

public static Date getDate(int year, int month, int day)

getDate

protected static Date getDate(int year, int month, int day, TimeZone tz)

getDate

protected static Date getDate(int year, int month, int day, int hourOfDay, int minute, int second, TimeZone tz)

getModule

protected String getModule()

getRepository

protected File getRepository()

Returns: Location of the revisioned (read only) repository

getRepositoryRoot

protected File getRepositoryRoot()

Returns: default location of the test read/write repository

getScmFileSet

protected ScmFileSet getScmFileSet()

getScmManager

protected ScmManager getScmManager()

getUpdatingCopy

protected File getUpdatingCopy()

Returns: default location for doing update operations on a working tree

getWorkingCopy

protected File getWorkingCopy()

Returns: location of the working copy (always checkout)

getWorkingDirectory

protected File getWorkingDirectory()
Legacy method - same as getWorkingCopy()

Returns: location of the working copy (always checkout)

makeDirectory

protected static void makeDirectory(File basedir, String fileName)

makeFile

protected static void makeFile(File basedir, String fileName)

makeFile

public static void makeFile(File basedir, String fileName, String contents)

makeScmRepository

protected ScmRepository makeScmRepository(String scmUrl)

setDebugExecute

protected static void setDebugExecute(boolean debugExecute)

setUp

protected void setUp()
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.