Package com.atlassian.bamboo.repository
Class RepositoryModificationTestHelper
- java.lang.Object
-
- com.atlassian.bamboo.repository.RepositoryModificationTestHelper
-
public class RepositoryModificationTestHelper extends Object
Helper to apply modifications to working copies of repositories in order to test various operations, e.g. committing changes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createFileInCheckoutPath(@NotNull File checkoutPath)
Create a random file in the working copy.static void
deleteFileFromCheckoutPath(@NotNull File checkoutPath)
Delete a random file from the working copy.static @Nullable File
getRepositoryTrackedFile(@NotNull File fileOrDirectory)
Try to find any repository tracked file.static void
leaveCheckoutPathUnmodified(@NotNull File checkoutPath)
Do nothing with the working copy.static void
modifyFileInCheckoutPath(@NotNull File checkoutPath)
Modifies content of a random file in the working copy.
-
-
-
Method Detail
-
leaveCheckoutPathUnmodified
public static void leaveCheckoutPathUnmodified(@NotNull @NotNull File checkoutPath)
Do nothing with the working copy.
-
createFileInCheckoutPath
public static void createFileInCheckoutPath(@NotNull @NotNull File checkoutPath)
Create a random file in the working copy.
-
deleteFileFromCheckoutPath
public static void deleteFileFromCheckoutPath(@NotNull @NotNull File checkoutPath)
Delete a random file from the working copy. Will perform a recursive search.
-
modifyFileInCheckoutPath
public static void modifyFileInCheckoutPath(@NotNull @NotNull File checkoutPath)
Modifies content of a random file in the working copy. Will perform a recursive search.
-
getRepositoryTrackedFile
@Nullable public static @Nullable File getRepositoryTrackedFile(@NotNull @NotNull File fileOrDirectory)
Try to find any repository tracked file.- Parameters:
fileOrDirectory
- either a directory to scan or a file to test- Returns:
- any file which is not a special repository file, or null if no file qualified
-
-