|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
nl.toolforge.karma.core.test.BaseTest
nl.toolforge.karma.core.test.LocalCVSInitializer
Initializes tests that need a local CVS repository. This local repository can be found as a zip
-file
and/or tar
file in the resources/test
directory of this packages' sources. It contains a
CVS repository with predefined modules that can be used for testing purposes. If the CVS repository cannot be found
(i.e. the user has not prepared his/her local environment with the CVSROOT), and you don't want your CVS stuff to
be tested, make sure you ignore these testcases in your test-configuration.
Note the dependency of this class with Location
and
CVSRepository
.
When performing operations on managed files, a randomize function is used to be able to repeatedly perform
tests. Filenames and modulenames in the repository could be named like bla_036548290.56437
.
Field Summary | |
protected static java.lang.String |
DEFAULT_MODULE_1
The name of the a test module in the test repository |
protected static java.util.Random |
randomizer
Can be used to access random int s. |
Constructor Summary | |
LocalCVSInitializer()
|
Method Summary | |
Module |
checkoutDefaultModule1()
Checks out DEFAULT_MODULE_1 , which can then be used to test against. |
Module |
checkoutDefaultModuleWithVersion()
|
protected java.lang.String |
getTestFileName()
Creates a randomly named test filename in the module directory ( TestModule ) for the test cvs
repository. |
protected CVSRepository |
getTestLocation()
Gets the CVSRepository that can be used for junit testing. |
protected Runner |
getTestRunner()
Initializes a Runner for test purposes. |
protected Runner |
getTestRunner(CommandResponse response)
Initializes a Runner for test purposes, with an optional CommandResponse. |
void |
setUp()
|
void |
tearDown()
Deletes the temporary directory. |
void |
testNothing()
When this class is run (it is a test class), it won't bother you with 'no tests found'. |
Methods inherited from class nl.toolforge.karma.core.test.BaseTest |
getClassLoader, getWorkingContext |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.lang.String DEFAULT_MODULE_1
protected static java.util.Random randomizer
int
s.
Constructor Detail |
public LocalCVSInitializer()
Method Detail |
public void setUp() throws InitializationException
setUp
in class BaseTest
InitializationException
public void tearDown()
tearDown
in class BaseTest
protected CVSRepository getTestLocation()
CVSRepository
that can be used for junit testing.
protected java.lang.String getTestFileName() throws InitializationException
TestModule
) for the test cvs
repository. Names are of the form test_<random-int>
.
InitializationException
public final Module checkoutDefaultModule1()
Checks out DEFAULT_MODULE_1
, which can then be used to test against.
public final Module checkoutDefaultModuleWithVersion()
protected final Runner getTestRunner() throws CVSException, AuthenticationException
CVSException
- When initializing the runner failed.
AuthenticationException
protected final Runner getTestRunner(CommandResponse response) throws CVSException, AuthenticationException
response
-
CVSException
- When initializing the runner failed.
AuthenticationException
public void testNothing()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |