* @throws RedmineAuthenticationException thrown in case something went wrong while trying to login
* @throws NotFoundException thrown in case the objects requested for could not be found
*/
@Test
public void testGetIssueCategories() throws RedmineException {
Project project = projectManager.getProjectByKey(projectKey);
// create some categories
IssueCategory testIssueCategory1 = IssueCategoryFactory.create(project,
"Category" + new Date().getTime());
testIssueCategory1.setAssignee(IntegrationTestHelper.getOurUser());
IssueCategory newIssueCategory1 = issueManager.createCategory(testIssueCategory1);
IssueCategory testIssueCategory2 = IssueCategoryFactory.create(project,
"Category" + new Date().getTime());
testIssueCategory2.setAssignee(IntegrationTestHelper.getOurUser());
IssueCategory newIssueCategory2 = issueManager.createCategory(testIssueCategory2);
try {
List<IssueCategory> categories = issueManager.getCategories(project.getId());
assertEquals("Wrong number of categories for project "
+ project.getName() + " delivered by Redmine Java API", 2,
categories.size());
for (IssueCategory category : categories) {
// assert category
assertNotNull("ID of category must not be null",
category.getId());