Skip to content

Commit

Permalink
#1013 impl. & test BitbucketRepo::issues()
Browse files Browse the repository at this point in the history
  • Loading branch information
alilosoft committed Mar 11, 2021
1 parent 6bacc83 commit 4c198ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ public String fullName() {

@Override
public Issues issues() {
throw new UnsupportedOperationException("Not implemented yet");
return new BitbucketIssues(
this.resources(),
URI.create(this.repoUri().toString() + "/issues"),
this,
this.storage()
);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,21 @@ public void activatesProject() {
/**
* BitbucketRepo.issues() returns its issues.
*/
@Test(expected = UnsupportedOperationException.class)
@Test
public void returnsIssues() {
new BitbucketRepo(
BitbucketRepo repo = new BitbucketRepo(
Mockito.mock(JsonResources.class),
URI.create("https://bitbucket.org/api/2.0/repositories/john/test"),
Mockito.mock(User.class),
Mockito.mock(Storage.class)
).issues();
);
MatcherAssert.assertThat(
repo.issues(),
Matchers.allOf(
Matchers.notNullValue(),
Matchers.instanceOf(BitbucketIssues.class)
)
);
}

/**
Expand Down

1 comment on commit 4c198ef

@zoeself
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fellahi-ali I've opened the Issues [#1058, #1059] for the newly added to-dos.

The to-dos may have been added in an earlier commit, but I've found them just now.

Please sign in to comment.