Extend GitLabRule to allow accessing a project by name and getting a list of all existing project identifiers

This commit is contained in:
Oscar Salvador Morillo Victoria 2016-03-30 23:26:13 +02:00
parent 55e2894d9c
commit 259e8e2065
1 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,14 @@ public class GitLabRule implements TestRule {
return new GitlabStatement(base);
}
public Project getProject(final String projectName) {
return client.getProject(projectName);
}
public List<String> getProjectIds() {
return projectIds;
}
public String createProject(ProjectRequest request) {
Project project = client.createProject(request.getName());
projectIds.add(project.getId().toString());