gate.versioning.cmdline
Class AbstractTestVersionControl

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by gate.versioning.cmdline.AbstractTestVersionControl
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
TestCvsVersionControl, TestSvnVersionControl

public abstract class AbstractTestVersionControl
extends junit.framework.TestCase

Tests for version control API.


Field Summary
protected  File checkedOutDir
           
protected  String checkedOutDirName
           
protected  boolean DEBUG
           
protected  File newRootDir
           
protected  Repository rep
           
protected  File rootDir
           
protected  String testDirPath
           
protected  URL testDirURL
           
protected  String testFileName
           
protected  String testsDirName
           
protected  File workingDir
           
 
Constructor Summary
AbstractTestVersionControl(String name)
           
 
Method Summary
 File appendToTestFile()
          Helper function for external users of this class.
 Repository checkOutTestDir()
          Helper function for external users of this class.
protected abstract  String getRepType()
          What type of repository implementation to use.
protected abstract  String getRootName()
          Basename of the repository directory.
protected abstract  String getRootPrefix()
          Prefix of the repository directory (e.g.
 void setUp()
          Create new repository object for testing
 void tearDown()
          Delete any checked-out files
 void testAddAndDelete()
           
 void testCheckout()
           
 void testCreate()
           
 void testDiffAndCheckin()
           
 void testExists()
          Check testExists.
 void testImport()
          Test the operation of Repository.importDir(String).
 void testImport2()
          Check that testImport can run twice on the same test fixture without failing.
 void testInit()
          Test initialisation
 void testLifeCycle()
          Lifecycle test - import, existence, checkout, modify, ...
 void testStatus()
           
 void testStatusIndicators()
           
 void testUpdate()
           
 
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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

testsDirName

protected String testsDirName

testDirURL

protected URL testDirURL

checkedOutDirName

protected String checkedOutDirName

testFileName

protected String testFileName

testDirPath

protected String testDirPath

rootDir

protected File rootDir

workingDir

protected File workingDir

checkedOutDir

protected File checkedOutDir

newRootDir

protected File newRootDir

DEBUG

protected boolean DEBUG

rep

protected Repository rep
Constructor Detail

AbstractTestVersionControl

public AbstractTestVersionControl(String name)
Method Detail

getRepType

protected abstract String getRepType()
What type of repository implementation to use.


getRootName

protected abstract String getRootName()
Basename of the repository directory.


getRootPrefix

protected abstract String getRootPrefix()
Prefix of the repository directory (e.g. "file:///") or "".


setUp

public void setUp()
           throws IOException,
                  UnsupportedEncodingException,
                  gate.util.GateException,
                  ClassNotFoundException,
                  InstantiationException,
                  IllegalAccessException
Create new repository object for testing

Overrides:
setUp in class junit.framework.TestCase
Throws:
IOException
UnsupportedEncodingException
gate.util.GateException
ClassNotFoundException
InstantiationException
IllegalAccessException

testInit

public void testInit()
Test initialisation


testCheckout

public void testCheckout()

testDiffAndCheckin

public void testDiffAndCheckin()
                        throws Exception
Throws:
Exception

testUpdate

public void testUpdate()

testStatus

public void testStatus()

testAddAndDelete

public void testAddAndDelete()

testCreate

public void testCreate()
                throws gate.util.GateException
Throws:
gate.util.GateException

testStatusIndicators

public void testStatusIndicators()
                          throws Exception
Throws:
Exception

testImport

public void testImport()
                throws Exception
Test the operation of Repository.importDir(String).

Throws:
gate.util.GateException
Exception

testImport2

public void testImport2()
                 throws Exception
Check that testImport can run twice on the same test fixture without failing.

Throws:
gate.util.GateException
Exception

testExists

public void testExists()
                throws Exception
Check testExists.

Throws:
Exception

testLifeCycle

public void testLifeCycle()
                   throws Exception
Lifecycle test - import, existence, checkout, modify, ...

Throws:
Exception

tearDown

public void tearDown()
Delete any checked-out files

Overrides:
tearDown in class junit.framework.TestCase

checkOutTestDir

public Repository checkOutTestDir()
                           throws Exception
Helper function for external users of this class. Check out test dir.

Returns:
Repository the repository.
Throws:
Exception

appendToTestFile

public File appendToTestFile()
                      throws Exception
Helper function for external users of this class. Append line to test file.

Returns:
File the checked out file.
Throws:
Exception