use of org.jetbrains.plugins.github.api.data.GithubIssue in project intellij-community by JetBrains.
the class GithubIssuesTest method testQueriedIssues1.
public void testQueriedIssues1() throws Exception {
List<GithubIssue> result = GithubApiUtil.getIssuesQueried(new GithubConnection(myAuth), myLogin2, REPO_NAME, null, "abracadabra", true);
List<Long> issues = ContainerUtil.map(result, new Function<GithubIssue, Long>() {
@Override
public Long fun(GithubIssue githubIssue) {
return githubIssue.getNumber();
}
});
List<Long> expected = Arrays.asList(10L, 12L);
assertTrue(Comparing.haveEqualElements(issues, expected));
}
use of org.jetbrains.plugins.github.api.data.GithubIssue in project intellij-community by JetBrains.
the class GithubIssuesTest method testAssigneeIssues2.
public void testAssigneeIssues2() throws Exception {
List<GithubIssue> result = GithubApiUtil.getIssuesAssigned(new GithubConnection(myAuth), myLogin2, REPO_NAME, myLogin2, 100, false);
List<Long> issues = ContainerUtil.map(result, new Function<GithubIssue, Long>() {
@Override
public Long fun(GithubIssue githubIssue) {
return githubIssue.getNumber();
}
});
List<Long> expected = Arrays.asList(1L, 2L);
assertTrue(Comparing.haveEqualElements(issues, expected));
}
use of org.jetbrains.plugins.github.api.data.GithubIssue in project intellij-community by JetBrains.
the class GithubIssuesTest method testAssigneeIssues5.
public void testAssigneeIssues5() throws Exception {
List<GithubIssue> result = GithubApiUtil.getIssuesAssigned(new GithubConnection(myAuth), myLogin2, REPO_NAME, myLogin2, 100, true);
List<Long> issues = ContainerUtil.map(result, new Function<GithubIssue, Long>() {
@Override
public Long fun(GithubIssue githubIssue) {
return githubIssue.getNumber();
}
});
List<Long> expected = Arrays.asList(1L, 2L);
assertTrue(Comparing.haveEqualElements(issues, expected));
}
use of org.jetbrains.plugins.github.api.data.GithubIssue in project intellij-community by JetBrains.
the class GithubIssuesTest method testAssigneeIssues6.
public void testAssigneeIssues6() throws Exception {
List<GithubIssue> result = GithubApiUtil.getIssuesAssigned(new GithubConnection(myAuth), myLogin2, REPO_NAME, "", 100, true);
List<Long> issues = ContainerUtil.map(result, new Function<GithubIssue, Long>() {
@Override
public Long fun(GithubIssue githubIssue) {
return githubIssue.getNumber();
}
});
List<Long> expected = Arrays.asList(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L);
assertTrue(Comparing.haveEqualElements(issues, expected));
}
use of org.jetbrains.plugins.github.api.data.GithubIssue in project intellij-community by JetBrains.
the class GithubIssuesTest method testAssigneeIssues4.
public void testAssigneeIssues4() throws Exception {
List<GithubIssue> result = GithubApiUtil.getIssuesAssigned(new GithubConnection(myAuth), myLogin2, REPO_NAME, myLogin1, 100, true);
List<Long> issues = ContainerUtil.map(result, new Function<GithubIssue, Long>() {
@Override
public Long fun(GithubIssue githubIssue) {
return githubIssue.getNumber();
}
});
List<Long> expected = Arrays.asList(3L, 6L, 7L, 8L);
assertTrue(Comparing.haveEqualElements(issues, expected));
}
Aggregations