Class GitCheckInCommandTckTest
- java.lang.Object
-
- org.apache.maven.scm.PlexusJUnit4TestCase
-
- org.apache.maven.scm.ScmTestCase
-
- org.apache.maven.scm.ScmTckTestCase
-
- org.apache.maven.scm.tck.command.checkin.CheckInCommandTckTest
-
- org.apache.maven.scm.provider.git.command.checkin.GitCheckInCommandTckTest
-
public abstract class GitCheckInCommandTckTest extends CheckInCommandTckTest
-
-
Field Summary
-
Fields inherited from class org.apache.maven.scm.ScmTestCase
GMT_TIME_ZONE
-
Fields inherited from class org.apache.maven.scm.PlexusJUnit4TestCase
testName
-
-
Constructor Summary
Constructors Constructor Description GitCheckInCommandTckTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CheckOutScmResultcheckOut(java.io.File workingDirectory, ScmRepository repository)Convenience method to check out files from the repository.private CheckOutScmResultcheckoutRepoInto(java.io.File workingCopy, ScmRepository scmRepository)private static java.nio.file.PathcreateTempFileFromClasspathResource(java.lang.String resourceName, java.lang.String fileName)Creates a new file below a new temporary directory and copies the content of a classpath resource into it.private ScmFileSetcreateWorkspaceChange(java.io.File repo)voidinitRepo()Initialize repository at theScmTckTestCase.getScmUrl()location with the files inScmTckTestCase.getScmFileNames()voidtestCommitNoVerify()voidtestCommitWithRejectingPreCommitHook()voidtestRejectedNonFastForwardPush()voidtestUpToDatePush()-
Methods inherited from class org.apache.maven.scm.tck.command.checkin.CheckInCommandTckTest
testCheckInCommandFilesetWithBasedirOtherThanWorkingCopyRoot, testCheckInCommandPartialFileset, testCheckInCommandTest
-
Methods inherited from class org.apache.maven.scm.ScmTckTestCase
addToWorkingTree, checkIn, checkScmPresence, edit, getScmFileNames, getScmProviderCommand, getScmRepository, getScmUrl, mapFilesByPath, remove, removeRepo, setUp, tearDown
-
Methods inherited from class org.apache.maven.scm.ScmTestCase
assertCommandLine, assertFile, assertPath, assertResultIsSuccess, checkSystemCmdPresence, customizeContainerConfiguration, deleteDirectory, execute, getAssertionCopy, getDate, getDate, getDate, getRepository, getRepositoryRoot, getScmFileSet, getScmManager, getUpdatingCopy, getWorkingCopy, getWorkingDirectory, isSystemCmd, makeDirectory, makeFile, makeFile, makeScmRepository, printOutputError, setDebugExecute
-
Methods inherited from class org.apache.maven.scm.PlexusJUnit4TestCase
customizeComponentConfiguration, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getConfigurationName, getContainer, getCustomConfigurationName, getCustomModules, getName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, lookupMap, release, setupContainer
-
-
-
-
Method Detail
-
initRepo
public void initRepo() throws java.lang.ExceptionInitialize repository at the
ScmTckTestCase.getScmUrl()location with the files inScmTckTestCase.getScmFileNames()The setup is also asserting on the existence of these files.
Note: 'svnadmin' should be a system command.
This should only be used by this class (thus do not call this method from derived classes)- Specified by:
initRepoin classScmTckTestCase- Throws:
java.lang.Exception- if any
-
checkOut
protected CheckOutScmResult checkOut(java.io.File workingDirectory, ScmRepository repository) throws java.lang.Exception
Description copied from class:ScmTckTestCaseConvenience method to check out files from the repository.- Overrides:
checkOutin classScmTckTestCase- Throws:
java.lang.Exception
-
testUpToDatePush
public void testUpToDatePush() throws java.lang.Exception- Throws:
java.lang.Exception
-
testRejectedNonFastForwardPush
public void testRejectedNonFastForwardPush() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCommitWithRejectingPreCommitHook
public void testCommitWithRejectingPreCommitHook() throws java.lang.Exception- Throws:
java.lang.Exception
-
testCommitNoVerify
public void testCommitNoVerify() throws java.lang.Exception- Throws:
java.lang.Exception
-
checkoutRepoInto
private CheckOutScmResult checkoutRepoInto(java.io.File workingCopy, ScmRepository scmRepository) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createWorkspaceChange
private ScmFileSet createWorkspaceChange(java.io.File repo) throws java.io.IOException
- Throws:
java.io.IOException
-
createTempFileFromClasspathResource
private static java.nio.file.Path createTempFileFromClasspathResource(java.lang.String resourceName, java.lang.String fileName) throws java.io.IOExceptionCreates a new file below a new temporary directory and copies the content of a classpath resource into it. The caller is responsible for deleting the temporary directory afterwards.- Parameters:
resourceName- from where to populate the file (relative toclazz)fileName- the file name to create below- Returns:
- the newly created file
- Throws:
java.io.IOException- in case of an error creating the file or copying the resource
-
-