Class GitCheckInCommandTckTest

    • Constructor Detail

      • GitCheckInCommandTckTest

        public GitCheckInCommandTckTest()
    • Method Detail

      • initRepo

        public void initRepo()
                      throws java.lang.Exception

        Initialize repository at the ScmTckTestCase.getScmUrl() location with the files in ScmTckTestCase.getScmFileNames()

        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)

        Note: 'svnadmin' should be a system command.
        Specified by:
        initRepo in class ScmTckTestCase
        Throws:
        java.lang.Exception - if any
      • 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.IOException
        Creates 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 to clazz)
        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