@Test public void testDelete() throws Exception { RestClient restClient = mock(RestClient.class); URI uri = new URI("DUMMY"); when(restClient.buildURI(anyString(), any(Map.class))).thenReturn(uri); when(restClient.delete(eq(uri))).thenReturn(null); Issue issue = new Issue(restClient, Utils.getTestIssue()); Assert.assertTrue(issue.delete(true)); }
public boolean delete(final boolean deleteSubtasks) throws JiraException { boolean result; try { URI uri = restclient.buildURI(getBaseUri() + "issue/" + this.key, new HashMap<String, String>() {{ put("deleteSubtasks", String.valueOf(deleteSubtasks)); }}); result = (restclient.delete(uri) == null); } catch (Exception ex) { throw new JiraException("Failed to delete issue " + key, ex); } return result; }
Issue extends Resource { public boolean delete(final boolean deleteSubtasks) throws JiraException { boolean result; try { URI uri = restclient.buildURI(getBaseUri() + "issue/" + this.key, new HashMap<String, String>() {{ put("deleteSubtasks", String.valueOf(deleteSubtasks)); }}); result = (restclient.delete(uri) == null); } catch (Exception ex) { throw new JiraException("Failed to delete issue " + key, ex); } return result; } }
Issue extends Resource { public boolean delete(final boolean deleteSubtasks) throws JiraException { boolean result; try { URI uri = restclient.buildURI(getBaseUri() + "issue/" + this.key, new HashMap<String, String>() {{ put("deleteSubtasks", String.valueOf(deleteSubtasks)); }}); result = (restclient.delete(uri) == null); } catch (Exception ex) { throw new JiraException("Failed to delete issue " + key, ex); } return result; } protected  Issue(RestClient restclient, JSONObject json); }
Issue extends Resource { public boolean delete(final boolean deleteSubtasks) throws JiraException { boolean result; try { URI uri = restclient.buildURI(getBaseUri() + "issue/" + this.key, new HashMap<String, String>() {{ put("deleteSubtasks", String.valueOf(deleteSubtasks)); }}); result = (restclient.delete(uri) == null); } catch (Exception ex) { throw new JiraException("Failed to delete issue " + key, ex); } return result; } protected  Issue(RestClient restclient, JSONObject json); static int count(RestClient restclient, String jql); static JSONObject getCreateMetadata(
        RestClient restclient, String project, String issueType); List<Transition> getTransitions(); void addAttachment(File file); void addRemoteLink(String url, String title, String summary); FluentRemoteLink remoteLink(); void addAttachments(NewAttachment... attachments); void removeAttachment(String attachmentId); Comment addComment(String body); Comment addComment(String body, String visType, String visName); void link(String issue, String type); void link(String issue, String type, String body); void link(String issue, String type, String body, String visType, String visName); static FluentCreate create(RestClient restclient, String project, String issueType); FluentCreate createSubtask(); static Issue get(RestClient restclient, String key); static Issue get(RestClient restclient, String key, final String includedFields); static Issue get(RestClient restclient, String key, final String includedFields,
            final String expand); static SearchResult search(RestClient restclient, String jql,
            String includedFields, String expandFields, Integer maxResults,
            Integer startAt); void refresh(); void refresh(final String includedFields); Object getField(String name); FluentTransition transition(); FluentUpdate update(); void vote(); void unvote(); void addWatcher(String username); void deleteWatcher(String username); @Override String toString(); ChangeLog getChangeLog(); String getKey(); User getAssignee(); List<Attachment> getAttachments(); List<Comment> getComments(); List<Component> getComponents(); String getDescription(); Date getDueDate(); List<Version> getFixVersions(); List<IssueLink> getIssueLinks(); IssueType getIssueType(); List<String> getLabels(); Issue getParent(); Priority getPriority(); Project getProject(); User getReporter(); List<RemoteLink> getRemoteLinks(); Resolution getResolution(); Date getResolutionDate(); Status getStatus(); List<Issue> getSubtasks(); String getSummary(); TimeTracking getTimeTracking(); List<Version> getVersions(); Votes getVotes(); Watches getWatches(); List<WorkLog> getWorkLogs(); List<WorkLog> getAllWorkLogs(); Integer getTimeSpent(); Integer getTimeEstimate(); Date getCreatedDate(); Date getUpdatedDate(); boolean delete(final boolean deleteSubtasks); }
Issue extends Resource { public boolean delete(final boolean deleteSubtasks) throws JiraException { boolean result; try { URI uri = restclient.buildURI(getBaseUri() + "issue/" + this.key, new HashMap<String, String>() {{ put("deleteSubtasks", String.valueOf(deleteSubtasks)); }}); result = (restclient.delete(uri) == null); } catch (Exception ex) { throw new JiraException("Failed to delete issue " + key, ex); } return result; } protected  Issue(RestClient restclient, JSONObject json); static int count(RestClient restclient, String jql); static JSONObject getCreateMetadata(
        RestClient restclient, String project, String issueType); List<Transition> getTransitions(); void addAttachment(File file); void addRemoteLink(String url, String title, String summary); FluentRemoteLink remoteLink(); void addAttachments(NewAttachment... attachments); void removeAttachment(String attachmentId); Comment addComment(String body); Comment addComment(String body, String visType, String visName); void link(String issue, String type); void link(String issue, String type, String body); void link(String issue, String type, String body, String visType, String visName); static FluentCreate create(RestClient restclient, String project, String issueType); FluentCreate createSubtask(); static Issue get(RestClient restclient, String key); static Issue get(RestClient restclient, String key, final String includedFields); static Issue get(RestClient restclient, String key, final String includedFields,
            final String expand); static SearchResult search(RestClient restclient, String jql,
            String includedFields, String expandFields, Integer maxResults,
            Integer startAt); void refresh(); void refresh(final String includedFields); Object getField(String name); FluentTransition transition(); FluentUpdate update(); void vote(); void unvote(); void addWatcher(String username); void deleteWatcher(String username); @Override String toString(); ChangeLog getChangeLog(); String getKey(); User getAssignee(); List<Attachment> getAttachments(); List<Comment> getComments(); List<Component> getComponents(); String getDescription(); Date getDueDate(); List<Version> getFixVersions(); List<IssueLink> getIssueLinks(); IssueType getIssueType(); List<String> getLabels(); Issue getParent(); Priority getPriority(); Project getProject(); User getReporter(); List<RemoteLink> getRemoteLinks(); Resolution getResolution(); Date getResolutionDate(); Status getStatus(); List<Issue> getSubtasks(); String getSummary(); TimeTracking getTimeTracking(); List<Version> getVersions(); Votes getVotes(); Watches getWatches(); List<WorkLog> getWorkLogs(); List<WorkLog> getAllWorkLogs(); Integer getTimeSpent(); Integer getTimeEstimate(); Date getCreatedDate(); Date getUpdatedDate(); boolean delete(final boolean deleteSubtasks);  }