org.apache.maven.scm.provider.jazz.command
Class JazzTckUtil

java.lang.Object
  extended by org.apache.maven.scm.command.AbstractCommand
      extended by org.apache.maven.scm.provider.jazz.command.JazzTckUtil
All Implemented Interfaces:
Command

public class JazzTckUtil
extends AbstractCommand

Common utilities for Jazz TCK tests.

Author:
Chris Graham

Field Summary
 
Fields inherited from interface org.apache.maven.scm.command.Command
ROLE
 
Constructor Summary
JazzTckUtil()
           
 
Method Summary
protected  ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
           
 void generateNewSystemTime()
          If a TCK test case has more than one test case, it will need to generate a new workspace for each test.
 File getAssertionCopy()
           
 String getScmUrl()
          Return the URL used for this specific TCK test execution.
 String getSystemProperty(String name, String defaultValue)
          Get the specified system property.
 File getUpdatingCopy()
           
 File getWorkingCopy()
           
 void initRepo(ScmRepository repository)
          Create a unique repository workspace using the system time, based upon a supplied snapshot.
 void removeRepo()
          This method is available to those SCM clients that need to perform a cleanup at the end of the tests.
 
Methods inherited from class org.apache.maven.scm.command.AbstractCommand
execute, getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JazzTckUtil

public JazzTckUtil()
Method Detail

getSystemProperty

public String getSystemProperty(String name,
                                String defaultValue)
Get the specified system property. Borrowed from AccuRevTckUtil. TODO: Refactor to a common usage.

Parameters:
name - The name of the property to get.
defaultValue - A default value if not found.
Returns:

executeCommand

protected ScmResult executeCommand(ScmProviderRepository repository,
                                   ScmFileSet fileSet,
                                   CommandParameters parameters)
                            throws ScmException
Specified by:
executeCommand in class AbstractCommand
Throws:
ScmException

generateNewSystemTime

public void generateNewSystemTime()
If a TCK test case has more than one test case, it will need to generate a new workspace for each test. Use this method to provide uniqueness again.


initRepo

public void initRepo(ScmRepository repository)
              throws Exception
Create a unique repository workspace using the system time, based upon a supplied snapshot. The creation of this initial snapshot currently can not be scripted, so it needs to be done manually first.

Throws:
Exception
See Also:
ScmTckTestCase.initRepo()

removeRepo

public void removeRepo()
                throws Exception
This method is available to those SCM clients that need to perform a cleanup at the end of the tests. It is needed when server side operations are performed, or the check out dirs are outside of the normal target directory.

Throws:
Exception

getScmUrl

public String getScmUrl()
                 throws Exception
Return the URL used for this specific TCK test execution. It generates a unique workspace name, based on the system time.

Throws:
Exception
See Also:
ScmTckTestCase.getScmUrl()

getWorkingCopy

public File getWorkingCopy()
See Also:
ScmTestCase.getWorkingCopy()

getAssertionCopy

public File getAssertionCopy()
See Also:
ScmTestCase.getAssertionCopy()

getUpdatingCopy

public File getUpdatingCopy()
See Also:
ScmTestCase.getUpdatingCopy()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.