コード例 #1
0
 public void testGerman() throws Exception {
   myRepository.setUsername("german");
   myRepository.setPassword("german");
   Task[] issues = myRepository.getIssues(null, 50, 0);
   assertEquals(3, issues.length);
   assertEquals(TaskState.OPEN, issues[0].getState());
   assertFalse(issues[0].isClosed());
 }
コード例 #2
0
 /** Holds only for JIRA > 5.x.x */
 public void testExtractedErrorMessage() throws Exception {
   myRepository.setSearchQuery("foo < bar");
   try {
     myRepository.getIssues("", 50, 0);
     fail();
   } catch (Exception e) {
     assertEquals(
         "Request failed. Reason: \"Field 'foo' does not exist or you do not have permission to view it.\"",
         e.getMessage());
   }
 }
コード例 #3
0
 public void testJqlQuery() throws Exception {
   myRepository.setSearchQuery(
       "assignee = currentUser() AND (summary ~ 'foo' or resolution = Fixed)");
   assertEquals(2, myRepository.getIssues("", 50, 0).length);
 }