@Test public void testTryRetrievingContent() throws Exception { gitHubUtil = mock(GitHubUtil.class); GHContent content = mock(GHContent.class); when(gitHubUtil.tryRetrievingContent(any(), anyString(), anyString())).thenReturn(content); dockerfileGitHubUtil = new DockerfileGitHubUtil(gitHubUtil); assertEquals(dockerfileGitHubUtil.tryRetrievingContent(new GHRepository(), "path", "branch"), content); }
public GHContent tryRetrievingContent(GHRepository repo, String path, String branch) throws InterruptedException { return gitHubUtil.tryRetrievingContent(repo, path, branch); }
DockerfileGitHubUtil { public GHContent tryRetrievingContent(GHRepository repo, String path, String branch) throws InterruptedException { return gitHubUtil.tryRetrievingContent(repo, path, branch); } }
DockerfileGitHubUtil { public GHContent tryRetrievingContent(GHRepository repo, String path, String branch) throws InterruptedException { return gitHubUtil.tryRetrievingContent(repo, path, branch); } DockerfileGitHubUtil(GitHubUtil gitHubUtil); }
DockerfileGitHubUtil { public GHContent tryRetrievingContent(GHRepository repo, String path, String branch) throws InterruptedException { return gitHubUtil.tryRetrievingContent(repo, path, branch); } DockerfileGitHubUtil(GitHubUtil gitHubUtil); GHRepository getOrCreateFork(GHRepository parent); GHMyself getMyself(); GHRepository getRepo(String repoName); PagedSearchIterable<GHContent> findFilesWithImage(String query, String org); List<GHRepository> getGHRepositories(Multimap<String, String> pathToDockerfileInParentRepo,
                                                            GHMyself currentUser); void modifyAllOnGithub(GHRepository repo, String branch,
                                  String img, String tag); GHContent tryRetrievingContent(GHRepository repo, String path, String branch); void modifyOnGithub(GHContent content,
                               String branch, String img, String tag, String customMessage); GitHubJsonStore getGitHubJsonStore(String store); void createPullReq(GHRepository origRepo,
                              String branch, GHRepository forkRepo,
                              PullRequestInfo pullRequestInfo); Optional<GHPullRequest> getPullRequestForImageBranch(GHRepository repository, GitForkBranch gitForkBranch); void createOrUpdateForkBranchToParentDefault(GHRepository parent, GHRepository fork, GitForkBranch gitForkBranch); boolean thisUserIsOwner(GHRepository repo); Optional<PagedSearchIterable<GHContent>> getGHContents(String org, String img); }
DockerfileGitHubUtil { public GHContent tryRetrievingContent(GHRepository repo, String path, String branch) throws InterruptedException { return gitHubUtil.tryRetrievingContent(repo, path, branch); } DockerfileGitHubUtil(GitHubUtil gitHubUtil); GHRepository getOrCreateFork(GHRepository parent); GHMyself getMyself(); GHRepository getRepo(String repoName); PagedSearchIterable<GHContent> findFilesWithImage(String query, String org); List<GHRepository> getGHRepositories(Multimap<String, String> pathToDockerfileInParentRepo,
                                                            GHMyself currentUser); void modifyAllOnGithub(GHRepository repo, String branch,
                                  String img, String tag); GHContent tryRetrievingContent(GHRepository repo, String path, String branch); void modifyOnGithub(GHContent content,
                               String branch, String img, String tag, String customMessage); GitHubJsonStore getGitHubJsonStore(String store); void createPullReq(GHRepository origRepo,
                              String branch, GHRepository forkRepo,
                              PullRequestInfo pullRequestInfo); Optional<GHPullRequest> getPullRequestForImageBranch(GHRepository repository, GitForkBranch gitForkBranch); void createOrUpdateForkBranchToParentDefault(GHRepository parent, GHRepository fork, GitForkBranch gitForkBranch); boolean thisUserIsOwner(GHRepository repo); Optional<PagedSearchIterable<GHContent>> getGHContents(String org, String img);  }