}
}
@Test
public void testTimeEntryDefaults() throws RedmineException {
final TimeEntry template = TimeEntryFactory.create();
final Issue tmp = IssueFactory.createWithSubject("aaabbbccc");
final Issue tmpIssue = issueManager.createIssue(projectKey, tmp);
try {
template.setHours(123.f);
template.setActivityId(ACTIVITY_ID);
template.setIssueId(tmpIssue.getId());
final TimeEntry result = issueManager.createTimeEntry(template);
try {
Assert.assertNotNull(result.getId());
Assert.assertNotNull(result.getIssueId());
Assert.assertNotNull(result.getProjectId());
Assert.assertNotNull(result.getProjectName());
Assert.assertNotNull(result.getUserName());
Assert.assertNotNull(result.getUserId());
Assert.assertNotNull(result.getActivityName());
Assert.assertNotNull(result.getActivityId());
Assert.assertEquals(Float.valueOf(123.0f), result.getHours());
Assert.assertEquals("", result.getComment());
Assert.assertNotNull(result.getSpentOn());
Assert.assertNotNull(result.getCreatedOn());
Assert.assertNotNull(result.getUpdatedOn());
} finally {
issueManager.deleteTimeEntry(result.getId());
}
} finally {
issueManager.deleteIssue(tmpIssue.getId());
}
}