1
0
Fork 0
jira-client/src/test/java/net/rcarz/jiraclient/Utils.java

200 lines
14 KiB
Java

package net.rcarz.jiraclient;
import net.sf.json.JSONObject;
import net.sf.json.JSONSerializer;
public class Utils {
public static JSONObject getTestIssue() {
JSONObject jsonObject = (JSONObject) JSONSerializer.toJSON("{\n" +
" \"expand\": \"renderedFields,names,schema,transitions,operations,editmeta,changelog\",\n" +
" \"id\": \"10742\",\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/latest/issue/10742\",\n" +
" \"key\": \"FILTA-43\",\n" +
" \"fields\": {\n" +
" \"progress\": {\n" +
" \"progress\": 0,\n" +
" \"total\": 0\n" +
" },\n" +
" \"summary\": \"Maintain Company Details\",\n" +
" \"timetracking\": {\n" +
" \n" +
" },\n" +
" \"issuetype\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/issuetype/7\",\n" +
" \"id\": \"7\",\n" +
" \"description\": \"This is a test issue type.\",\n" +
" \"iconUrl\": \"https://brainbubble.atlassian.net/images/icons/issuetypes/story.png\",\n" +
" \"name\": \"Story\",\n" +
" \"subtask\": false\n" +
" },\n" +
" \"votes\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/issue/FILTA-43/votes\",\n" +
" \"votes\": 0,\n" +
" \"hasVoted\": false\n" +
" },\n" +
" \"resolution\": null,\n" +
" \"fixVersions\": [\n" +
" {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/version/10200\",\n" +
" \"id\": \"10200\",\n" +
" \"description\": \"First Full Functional Build\",\n" +
" \"name\": \"1.0\",\n" +
" \"archived\": false,\n" +
" \"released\": false,\n" +
" \"releaseDate\": \"2013-12-01\"\n" +
" }\n" +
" ],\n" +
" \"resolutiondate\": null,\n" +
" \"timespent\": null,\n" +
" \"reporter\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/user?username=joseph\",\n" +
" \"name\": \"joseph\",\n" +
" \"emailAddress\": \"joseph.b.mccarthy2012@googlemail.com\",\n" +
" \"avatarUrls\": {\n" +
" \"16x16\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=16\",\n" +
" \"24x24\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=24\",\n" +
" \"32x32\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=32\",\n" +
" \"48x48\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=48\"\n" +
" },\n" +
" \"displayName\": \"Joseph McCarthy\",\n" +
" \"active\": true\n" +
" },\n" +
" \"aggregatetimeoriginalestimate\": null,\n" +
" \"created\": \"2013-09-29T20:16:19.854+0100\",\n" +
" \"updated\": \"2013-10-09T22:24:55.961+0100\",\n" +
" \"description\": \"{panel:title=Description|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#FFFFCE}\\r\\nAs a company / admin\\r\\n\\r\\nI want to update the company details like contact details / name and so on\\r\\n\\r\\nSo that their details are up to date\\r\\n{panel}\\r\\n\\r\\n{panel:title=Acceptance Criteria|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#FFFFCE}\\r\\nCan I change the company name?\\r\\nCan I change our emails, addresses and phone number etc?\\r\\nCan I change my invoicing details?\\r\\nCan I change our application service agreement?\\r\\n{panel}\",\n" +
" \"priority\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/priority/3\",\n" +
" \"iconUrl\": \"https://brainbubble.atlassian.net/images/icons/priorities/major.png\",\n" +
" \"name\": \"Major\",\n" +
" \"id\": \"3\"\n" +
" },\n" +
" \"duedate\": null,\n" +
" \"customfield_10001\": null,\n" +
" \"customfield_10002\": null,\n" +
" \"customfield_10003\": null,\n" +
" \"issuelinks\": [\n" +
" \n" +
" ],\n" +
" \"customfield_10004\": null,\n" +
" \"watches\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/issue/FILTA-43/watchers\",\n" +
" \"watchCount\": 0,\n" +
" \"isWatching\": false\n" +
" },\n" +
" \"worklog\": {\n" +
" \"startAt\": 0,\n" +
" \"maxResults\": 20,\n" +
" \"total\": 0,\n" +
" \"worklogs\": [\n" +
" \n" +
" ]\n" +
" },\n" +
" \"customfield_10000\": null,\n" +
" \"subtasks\": [\n" +
" \n" +
" ],\n" +
" \"status\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/status/10004\",\n" +
" \"description\": \"Issue is currently in progress.\",\n" +
" \"iconUrl\": \"https://brainbubble.atlassian.net/images/icons/statuses/open.png\",\n" +
" \"name\": \"To Do\",\n" +
" \"id\": \"10004\"\n" +
" },\n" +
" \"customfield_10007\": null,\n" +
" \"customfield_10006\": \"90\",\n" +
" \"labels\": [\n" +
" \n" +
" ],\n" +
" \"customfield_10005\": null,\n" +
" \"workratio\": -1,\n" +
" \"assignee\": null,\n" +
" \"attachment\": [\n" +
" \n" +
" ],\n" +
" \"customfield_10200\": null,\n" +
" \"aggregatetimeestimate\": null,\n" +
" \"project\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/project/10501\",\n" +
" \"id\": \"10501\",\n" +
" \"key\": \"FILTA\",\n" +
" \"name\": \"Filta\",\n" +
" \"avatarUrls\": {\n" +
" \"16x16\": \"https://brainbubble.atlassian.net/secure/projectavatar?size=xsmall&pid=10501&avatarId=10307\",\n" +
" \"24x24\": \"https://brainbubble.atlassian.net/secure/projectavatar?size=small&pid=10501&avatarId=10307\",\n" +
" \"32x32\": \"https://brainbubble.atlassian.net/secure/projectavatar?size=medium&pid=10501&avatarId=10307\",\n" +
" \"48x48\": \"https://brainbubble.atlassian.net/secure/projectavatar?pid=10501&avatarId=10307\"\n" +
" }\n" +
" },\n" +
" \"versions\": [\n" +
" \n" +
" ],\n" +
" \"environment\": null,\n" +
" \"timeestimate\": null,\n" +
" \"lastViewed\": \"2013-11-24T16:37:50.358+0000\",\n" +
" \"aggregateprogress\": {\n" +
" \"progress\": 0,\n" +
" \"total\": 0\n" +
" },\n" +
" \"components\": [\n" +
" {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/component/10303\",\n" +
" \"id\": \"10303\",\n" +
" \"name\": \"Account Management\"\n" +
" },\n" +
" {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/component/10301\",\n" +
" \"id\": \"10301\",\n" +
" \"name\": \"User Management\"\n" +
" }\n" +
" ],\n" +
" \"comment\": {\n" +
" \"startAt\": 0,\n" +
" \"maxResults\": 1,\n" +
" \"total\": 1,\n" +
" \"comments\": [\n" +
" {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/issue/10742/comment/10500\",\n" +
" \"id\": \"10500\",\n" +
" \"author\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/user?username=joseph\",\n" +
" \"name\": \"joseph\",\n" +
" \"emailAddress\": \"joseph.b.mccarthy2012@googlemail.com\",\n" +
" \"avatarUrls\": {\n" +
" \"16x16\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=16\",\n" +
" \"24x24\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=24\",\n" +
" \"32x32\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=32\",\n" +
" \"48x48\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=48\"\n" +
" },\n" +
" \"displayName\": \"Joseph McCarthy\",\n" +
" \"active\": true\n" +
" },\n" +
" \"body\": \"this is not really assigned to me, just testing out the intellij - jira plugin :)\",\n" +
" \"updateAuthor\": {\n" +
" \"self\": \"https://brainbubble.atlassian.net/rest/api/2/user?username=joseph\",\n" +
" \"name\": \"joseph\",\n" +
" \"emailAddress\": \"joseph.b.mccarthy2012@googlemail.com\",\n" +
" \"avatarUrls\": {\n" +
" \"16x16\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=16\",\n" +
" \"24x24\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=24\",\n" +
" \"32x32\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=32\",\n" +
" \"48x48\": \"https://secure.gravatar.com/avatar/a5a271f9eee8bbb3795f41f290274f8c?d=mm&s=48\"\n" +
" },\n" +
" \"displayName\": \"Joseph McCarthy\",\n" +
" \"active\": true\n" +
" },\n" +
" \"created\": \"2013-10-09T22:14:54.979+0100\",\n" +
" \"updated\": \"2013-10-09T22:24:55.956+0100\"\n" +
" }\n" +
" ]\n" +
" },\n" +
" \"timeoriginalestimate\": null,\n" +
" \"aggregatetimespent\": null\n" +
" }\n" +
"}");
return jsonObject;
}
}