@Test public void testWorklog() { List<WorkLog> workLogs = Field.getResourceArray(WorkLog.class, Utils.getTestIssueWorklogs().get("worklogs"), null); assertEquals(2, workLogs.size()); WorkLog workLog = workLogs.get(0); assertEquals("comment for worklog 1", workLog.getComment()); assertEquals("6h", workLog.getTimeSpent()); assertEquals("45517", workLog.getId()); String author = "joseph"; assertEquals(author, workLog.getAuthor().getName()); final long expectedStartedUnixTimeStamp = 1439803140000L; assertEquals(expectedStartedUnixTimeStamp, workLog.getStarted().getTime()); final long expectedCreatedAndUpdatedUnitTimeStamp = 1440062384000L; assertEquals(expectedCreatedAndUpdatedUnitTimeStamp, workLog.getCreatedDate().getTime()); assertEquals(expectedCreatedAndUpdatedUnitTimeStamp, workLog.getUpdatedDate().getTime()); assertEquals(21600, workLog.getTimeSpentSeconds()); assertEquals(author, workLog.getUpdateAuthor().getName()); }
protected WorkLog(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); }
WorkLog extends Resource { protected WorkLog(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); } }
WorkLog extends Resource { protected WorkLog(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); } protected  WorkLog(RestClient restclient, JSONObject json); }
WorkLog extends Resource { protected WorkLog(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); } protected  WorkLog(RestClient restclient, JSONObject json); static WorkLog get(RestClient restclient, String issue, String id); @Override String toString(); User getAuthor(); String getComment(); Date getCreatedDate(); User getUpdateAuthor(); Date getUpdatedDate(); Date getStarted(); String getTimeSpent(); int getTimeSpentSeconds(); }
WorkLog extends Resource { protected WorkLog(RestClient restclient, JSONObject json) { super(restclient); if (json != null) deserialise(json); } protected  WorkLog(RestClient restclient, JSONObject json); static WorkLog get(RestClient restclient, String issue, String id); @Override String toString(); User getAuthor(); String getComment(); Date getCreatedDate(); User getUpdateAuthor(); Date getUpdatedDate(); Date getStarted(); String getTimeSpent(); int getTimeSpentSeconds();  }