Search in sources :

Example 1 with GitLabRevisionApiTestResource

use of org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApiTestResource in project legend-sdlc by finos.

the class IntegrationTestGitLabRevisionApis method setUpRevisionApi.

/**
 * Authenticates with OAuth2 and instantiate the test resource.
 */
private static void setUpRevisionApi() {
    GitLabUserContext gitLabMemberUserContext = prepareGitLabMemberUserContext();
    GitLabUserContext gitLabOwnerUserContext = prepareGitLabOwnerUserContext();
    GitLabConfiguration gitLabConfig = GitLabConfiguration.newGitLabConfiguration(null, null, null, null, null);
    ProjectStructureConfiguration projectStructureConfig = ProjectStructureConfiguration.emptyConfiguration();
    GitLabProjectApi gitLabProjectApi = new GitLabProjectApi(gitLabConfig, gitLabOwnerUserContext, projectStructureConfig, null, null, backgroundTaskProcessor, null);
    GitLabRevisionApi gitLabRevisionApi = new GitLabRevisionApi(gitLabMemberUserContext, backgroundTaskProcessor);
    GitLabWorkspaceApi gitLabWorkspaceApi = new GitLabWorkspaceApi(gitLabMemberUserContext, gitLabRevisionApi, backgroundTaskProcessor);
    GitLabEntityApi gitLabEntityApi = new GitLabEntityApi(gitLabMemberUserContext, backgroundTaskProcessor);
    gitLabRevisionApiTestResource = new GitLabRevisionApiTestResource(gitLabWorkspaceApi, gitLabProjectApi, gitLabEntityApi, gitLabRevisionApi);
}
Also used : GitLabWorkspaceApi(org.finos.legend.sdlc.server.gitlab.api.GitLabWorkspaceApi) GitLabConfiguration(org.finos.legend.sdlc.server.gitlab.GitLabConfiguration) GitLabRevisionApi(org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApi) GitLabProjectApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi) GitLabUserContext(org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext) GitLabRevisionApiTestResource(org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApiTestResource) GitLabEntityApi(org.finos.legend.sdlc.server.gitlab.api.GitLabEntityApi) ProjectStructureConfiguration(org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)

Example 2 with GitLabRevisionApiTestResource

use of org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApiTestResource in project legend-sdlc by finos.

the class TestGitLabServerRevisionApis method setUpRevisionApi.

/**
 * Authenticates with OAuth2 and instantiate the test resource.
 */
private static void setUpRevisionApi() {
    GitLabUserContext gitLabMemberUserContext = prepareGitLabMemberUserContext();
    GitLabUserContext gitLabOwnerUserContext = prepareGitLabOwnerUserContext();
    GitLabConfiguration gitLabConfig = GitLabConfiguration.newGitLabConfiguration(null, null, null, null, GitLabConfiguration.NewProjectVisibility.PRIVATE);
    ProjectStructureConfiguration projectStructureConfig = ProjectStructureConfiguration.emptyConfiguration();
    GitLabProjectApi gitLabProjectApi = new GitLabProjectApi(gitLabConfig, gitLabOwnerUserContext, projectStructureConfig, null, gitLabConfig, backgroundTaskProcessor, null);
    GitLabRevisionApi gitLabRevisionApi = new GitLabRevisionApi(gitLabMemberUserContext, backgroundTaskProcessor);
    GitLabWorkspaceApi gitLabWorkspaceApi = new GitLabWorkspaceApi(gitLabMemberUserContext, gitLabRevisionApi, backgroundTaskProcessor);
    GitLabEntityApi gitLabEntityApi = new GitLabEntityApi(gitLabMemberUserContext, backgroundTaskProcessor);
    gitLabRevisionApiTestResource = new GitLabRevisionApiTestResource(gitLabWorkspaceApi, gitLabProjectApi, gitLabEntityApi, gitLabRevisionApi);
}
Also used : GitLabWorkspaceApi(org.finos.legend.sdlc.server.gitlab.api.GitLabWorkspaceApi) GitLabConfiguration(org.finos.legend.sdlc.server.gitlab.GitLabConfiguration) GitLabRevisionApi(org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApi) GitLabProjectApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi) GitLabUserContext(org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext) GitLabRevisionApiTestResource(org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApiTestResource) GitLabEntityApi(org.finos.legend.sdlc.server.gitlab.api.GitLabEntityApi) ProjectStructureConfiguration(org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)

Aggregations

GitLabConfiguration (org.finos.legend.sdlc.server.gitlab.GitLabConfiguration)2 GitLabEntityApi (org.finos.legend.sdlc.server.gitlab.api.GitLabEntityApi)2 GitLabProjectApi (org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi)2 GitLabRevisionApi (org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApi)2 GitLabRevisionApiTestResource (org.finos.legend.sdlc.server.gitlab.api.GitLabRevisionApiTestResource)2 GitLabWorkspaceApi (org.finos.legend.sdlc.server.gitlab.api.GitLabWorkspaceApi)2 GitLabUserContext (org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext)2 ProjectStructureConfiguration (org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)2