org.apache.maven.scm
Class ScmTckTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.codehaus.plexus.PlexusTestCase
              extended byorg.apache.maven.scm.ScmTestCase
                  extended byorg.apache.maven.scm.ScmTckTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ChangeLogCommandTckTest, CheckInCommandTckTest, CheckOutCommandTckTest, DiffCommandTckTest, StatusCommandTckTest, TagCommandTckTest, UpdateCommandTckTest

public abstract class ScmTckTestCase
extends ScmTestCase

Base class for all TcK tests.

Basically all it does is to setup a default test enviroment common for all tck tests. The default setup includes:
1. Delete all default locations (working copy, updating copy etc)
2. Initialize the repository
3. Check out the repository to the working copy

Author:
Torbj?rn Eikli Sm?rgrav

Field Summary
 
Fields inherited from class org.apache.maven.scm.ScmTestCase
GMT_TIME_ZONE
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
ScmTckTestCase()
           
 
Method Summary
protected  void addToWorkingTree(java.io.File workingDirectory, java.io.File file, org.apache.maven.scm.repository.ScmRepository repository)
          Convenience method to add a file to the working tree at the working directory
protected  org.apache.maven.scm.command.checkout.CheckOutScmResult checkOut(java.io.File workingDirectory, org.apache.maven.scm.repository.ScmRepository repository)
          Convenience method to checkout files from the repository
protected  org.apache.maven.scm.repository.ScmRepository getScmRepository()
          Convenience method to get the ScmRepository for this provider
abstract  java.lang.String getScmUrl()
           
abstract  void initRepo()
          Initialize repository at the getScmUrl() location with the files:


/pom.xml
/readme.txt
/src/main/java/Application.java
/src/test/java/Test.java

The setup is also asserting on the existence of these files.

protected  void setUp()
           
 
Methods inherited from class org.apache.maven.scm.ScmTestCase
assertFile, assertPath, assertResultIsSuccess, execute, getAssertionCopy, getDate, getDate, getDate, getModule, getRepository, getRepositoryRoot, getScmFileSet, getScmManager, getUpdatingCopy, getWorkingCopy, getWorkingDirectory, makeDirectory, makeFile, makeFile, makeScmRepository, setDebugExecute
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
 
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
 

Constructor Detail

ScmTckTestCase

public ScmTckTestCase()
Method Detail

getScmUrl

public abstract java.lang.String getScmUrl()
                                    throws java.lang.Exception
Returns:
A provider spesific and valid url for the repository
Throws:
java.lang.Exception

initRepo

public abstract void initRepo()
                       throws java.lang.Exception
Initialize repository at the getScmUrl() location with the files:


/pom.xml
/readme.txt
/src/main/java/Application.java
/src/test/java/Test.java

The setup is also asserting on the existence of these files.
This should only be used by this class (thus do not call this method from derived classes)

Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class ScmTestCase
Throws:
java.lang.Exception

getScmRepository

protected org.apache.maven.scm.repository.ScmRepository getScmRepository()
                                                                  throws java.lang.Exception
Convenience method to get the ScmRepository for this provider

Throws:
java.lang.Exception

checkOut

protected org.apache.maven.scm.command.checkout.CheckOutScmResult checkOut(java.io.File workingDirectory,
                                                                           org.apache.maven.scm.repository.ScmRepository repository)
                                                                    throws java.lang.Exception
Convenience method to checkout files from the repository

Throws:
java.lang.Exception

addToWorkingTree

protected void addToWorkingTree(java.io.File workingDirectory,
                                java.io.File file,
                                org.apache.maven.scm.repository.ScmRepository repository)
                         throws java.lang.Exception
Convenience method to add a file to the working tree at the working directory

Throws:
java.lang.Exception


Copyright © 2003-2006 Apache Software Foundation. All Rights Reserved.