Class RestRepositoryHelper


  • public class RestRepositoryHelper
    extends Object
    Helper methods related to repository model classes in functional tests.
    • Method Detail

      • toRestRepositoryConfig

        @NotNull
        public static @NotNull RestRepositoryConfig toRestRepositoryConfig​(@NotNull
                                                                           @NotNull Repository repository,
                                                                           @NotNull
                                                                           @NotNull String repositoryName)
        Converts the repository to it's REST representation.
        Parameters:
        repository - repository configuration
        repositoryName - display name of the repository
        Returns:
        DTO of the given repository object
      • getGitRepository

        @NotNull
        public static @NotNull Repository getGitRepository​(@NotNull
                                                           @NotNull GitRepositoryDescriptor repositoryDescriptor)
        Creates a Git Repository object for further usage in tests, e.g. with Backdoor.repositories().

        This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.

        Parameters:
        repositoryDescriptor - repository descriptor, generated e.g. by calling one of LocalGitSetupHelper methods.
        Returns:
        instantiated repository object
      • getGitRepository

        @NotNull
        public static @NotNull Repository getGitRepository​(@NotNull
                                                           @NotNull String repositoryUrl)
        Creates a Git Repository object for further usage in tests, e.g. with Backdoor.repositories().

        This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.

        Parameters:
        repositoryUrl - url to the repository
        Returns:
        instantiated repository object
      • getSvnRepository

        @NotNull
        public static @NotNull Repository getSvnRepository​(@NotNull
                                                           @NotNull SvnRepositoryDescriptor repositoryDescriptor,
                                                           @NotNull
                                                           @NotNull String svnSubDir)
        Creates an SVN Repository object for further usage in tests, e.g. with Backdoor.repositories().

        This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.

        Parameters:
        repositoryDescriptor - repository descriptor, generated e.g. by calling one of LocalRepositorySetupHelper methods.
        svnSubDir - SVN subdirectory
        Returns:
        instantiated repository object
      • getSvnRepository

        @NotNull
        public static @NotNull Repository getSvnRepository​(@NotNull
                                                           @NotNull String repositoryRoot,
                                                           @NotNull
                                                           @NotNull String branchName)
        Creates an SVN Repository object for further usage in tests, e.g. with Backdoor.repositories().

        This method currently does not provide security configuration settings. The repository has to be accessible from Bamboo.

        Parameters:
        repositoryRoot - url to the repository
        branchName - realtive path to branch
        Returns:
        instantiated repository object