org.tigris.subversion.javahl.tests
Class SVNTests
TestCase
org.tigris.subversion.javahl.tests.SVNTests
public class SVNTests
extends TestCase
common base class for the javahl binding tests
class | SVNTests.FileInputer - internal class which implements the InputInterface to read the data
from a file.
|
class | SVNTests.FileOutputer - internal class which implements the OutputInterface to write the data
to a file.
|
class | SVNTests.IgnoreOutputer - internal class implements the OutputInterface, but ignores the data
|
protected class | SVNTests.OneTest - this internal class represent the repository and the working copy for
one test.
|
protected SVNAdmin | admin - our admin object, mostly used for creating,dumping and loading
repositories
|
protected SVNClientInterface | client - the subversion client, what we want to test.
|
protected File | conf - the directory "config" in the localTmp.
|
protected Map | expectedCommitItems - the map of all items expected to be received by the callback for the
log message.
|
protected File | greekDump - the file in which the sample repository has been dumped.
|
protected File | greekRepos - the directory of the sample repository.
|
protected WC | greekWC - the initial working copy of the sample repository.
|
protected File | localTmp - the directory "svn-test-work/local_tmp" in the rootDir.
|
protected String | logMessage - standard log message.
|
protected File | repositories - the directory "repositories" in the rootDir.
|
protected File | rootDir - the root directory.
|
protected static String | rootDirectoryName - common root directory for all tests.
|
protected static String | rootUrl - common root URL for all tests.
|
protected String | testBaseName - the base name of the test.
|
protected static int | testCounter - this counter will be incremented for every test in one suite (test class)
|
protected File | workingCopies - the directory "working_copies" in the rootDir.
|
protected void | addExpectedCommitItem(String workingCopyPath, String baseUrl, String itemPath, int nodeKind, int stateFlags) - add another commit item expected during the callback for the log message.
|
protected String | getAdminDirectoryName() - Intended to be called as part of test method execution
(post-
setUp() ).
|
static void | main(String[] args) - Main method, will call all tests of all test classes
|
protected String | makeReposUrl(File file) - Create the url for the repository to be used for the tests.
|
protected static void | processArgs(String[] args) - retrieve the root directory and the root url from the command line
arguments
|
protected void | removeDirectoryWithContent(File localTmp) - Remove a directory with all files and directories it may contain.
|
protected void | setUp() - Standard initialization of one test
|
static TestSuite | suite() - build a test suite with all test of all test classes known
|
protected void | tearDown() - cleanup after one test
|
admin
protected SVNAdmin admin
our admin object, mostly used for creating,dumping and loading
repositories
conf
protected File conf
the directory "config" in the localTmp. It will be used as the
configuration directory for all the tests.
expectedCommitItems
protected Map expectedCommitItems
the map of all items expected to be received by the callback for the
log message. After each commit, this will be cleared
greekDump
protected File greekDump
the file in which the sample repository has been dumped.
greekRepos
protected File greekRepos
the directory of the sample repository.
greekWC
protected WC greekWC
the initial working copy of the sample repository.
localTmp
protected File localTmp
the directory "svn-test-work/local_tmp" in the rootDir. This
will be used for the sample repository and its dumpfile and for
the config directory
logMessage
protected String logMessage
standard log message. Used for all commits.
repositories
protected File repositories
the directory "repositories" in the rootDir. All test repositories will
be created here.
rootDir
protected File rootDir
the root directory. All other files and directories will created in
here
rootDirectoryName
protected static String rootDirectoryName
common root directory for all tests. Can be set by the command line or
by the system property "test.rootdir". If not set, the current directory
of this process is used
rootUrl
protected static String rootUrl
common root URL for all tests. Can be set by the command line or by the
system property "test.rooturl". If not set, the file url of the
rootDirectoryName is used.
testBaseName
protected String testBaseName
the base name of the test. Together with the testCounter this will make
up the directory name of the test.
testCounter
protected static int testCounter
this counter will be incremented for every test in one suite (test class)
workingCopies
protected File workingCopies
the directory "working_copies" in the rootDir. All test working copies
will be created here.
SVNTests
protected SVNTests()
Initialize one test object
addExpectedCommitItem
protected void addExpectedCommitItem(String workingCopyPath,
String baseUrl,
String itemPath,
int nodeKind,
int stateFlags)
add another commit item expected during the callback for the log message.
workingCopyPath
- the path of the of the workingbaseUrl
- the url for the repositoryitemPath
- the path of the item relative the working copynodeKind
- expected node kind (dir or file or none)stateFlags
- expected commit state flags
(see CommitItemStateFlags)
getAdminDirectoryName
protected String getAdminDirectoryName()
Intended to be called as part of test method execution
(post-
setUp()
). Calls
fail()
if the
directory name cannot be determined.
- The name of the working copy administrative directory.
main
public static void main(String[] args)
Main method, will call all tests of all test classes
args
- command line arguments
makeReposUrl
protected String makeReposUrl(File file)
Create the url for the repository to be used for the tests.
file
- the directory of the repository
- the URL for the repository
processArgs
protected static void processArgs(String[] args)
retrieve the root directory and the root url from the command line
arguments
args
- command line arguments
removeDirectoryWithContent
protected void removeDirectoryWithContent(File localTmp)
Remove a directory with all files and directories it may contain.
setUp
protected void setUp()
throws Exception
Standard initialization of one test
suite
public static TestSuite suite()
build a test suite with all test of all test classes known
tearDown
protected void tearDown()
throws Exception
cleanup after one test