Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Nov 15, 2019
1 parent 392dc2a commit 3f61a56
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/test/java/org/kohsuke/github/GHRepositoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void getBranchNonExistentBut200Status() throws Exception {
// Manually changed the returned status to 200 so dont take a new snapshot
this.snapshotNotAllowed();

//This should *never* happen but with mocking it was discovered
// This should *never* happen but with mocking it was discovered
GHRepository repo = getRepository();
try {
GHBranch branch = repo.getBranch("test/NonExistent");
Expand Down Expand Up @@ -219,8 +219,11 @@ public void listEmptyContributors() throws IOException {

@Test
public void searchRepositories() throws Exception {
PagedSearchIterable<GHRepository> r = gitHub.searchRepositories().q("tetris").language("assembly")
.sort(GHRepositorySearchBuilder.Sort.STARS).list();
PagedSearchIterable<GHRepository> r = gitHub.searchRepositories()
.q("tetris")
.language("assembly")
.sort(GHRepositorySearchBuilder.Sort.STARS)
.list();
GHRepository u = r.iterator().next();
// System.out.println(u.getName());
assertNotNull(u.getId());
Expand Down Expand Up @@ -301,22 +304,25 @@ public void testSetTopics() throws Exception {
topics.add("java");
topics.add("api-test-dummy");
repo.setTopics(topics);
assertThat("Topics retain input order (are not sort when stored)", repo.listTopics(),
assertThat("Topics retain input order (are not sort when stored)",
repo.listTopics(),
contains("java", "api-test-dummy"));

topics = new ArrayList<>();
topics.add("ordered-state");
topics.add("api-test-dummy");
topics.add("java");
repo.setTopics(topics);
assertThat("Topics behave as a set and retain order from previous calls", repo.listTopics(),
assertThat("Topics behave as a set and retain order from previous calls",
repo.listTopics(),
contains("java", "api-test-dummy", "ordered-state"));

topics = new ArrayList<>();
topics.add("ordered-state");
topics.add("api-test-dummy");
repo.setTopics(topics);
assertThat("Topics retain order even when some are removed", repo.listTopics(),
assertThat("Topics retain order even when some are removed",
repo.listTopics(),
contains("api-test-dummy", "ordered-state"));

topics = new ArrayList<>();
Expand Down

0 comments on commit 3f61a56

Please sign in to comment.