@Test public void testGetCreated_requirement() { Entity requirement = new Entity("requirement", 1); requirement.setProperty("creation-time", "2012-12-12"); requirement.setProperty("req-time", "12:12:12"); HpAlmTask task = new HpAlmTask(getProject(), requirement); Assert.assertEquals("2012-12-12 12:12:12 +0100", HpAlmCommentTest.format.format(task.getCreated())); }
public Date getCreated() { try { Date date = CommentField.dateFormat.parse(entity.getPropertyValue("creation-time")); if("requirement".equals(entity.getType())) { return new Date(date.getTime() + timeFormat.parse(entity.getPropertyValue("req-time")).getTime() + TimeZone.getDefault().getRawOffset()); } return date; } catch(ParseException e) { return getUpdated(); } }
HpAlmTask extends Task { public Date getCreated() { try { Date date = CommentField.dateFormat.parse(entity.getPropertyValue("creation-time")); if("requirement".equals(entity.getType())) { return new Date(date.getTime() + timeFormat.parse(entity.getPropertyValue("req-time")).getTime() + TimeZone.getDefault().getRawOffset()); } return date; } catch(ParseException e) { return getUpdated(); } } }
HpAlmTask extends Task { public Date getCreated() { try { Date date = CommentField.dateFormat.parse(entity.getPropertyValue("creation-time")); if("requirement".equals(entity.getType())) { return new Date(date.getTime() + timeFormat.parse(entity.getPropertyValue("req-time")).getTime() + TimeZone.getDefault().getRawOffset()); } return date; } catch(ParseException e) { return getUpdated(); } } HpAlmTask(Project project, Entity entity); }
HpAlmTask extends Task { public Date getCreated() { try { Date date = CommentField.dateFormat.parse(entity.getPropertyValue("creation-time")); if("requirement".equals(entity.getType())) { return new Date(date.getTime() + timeFormat.parse(entity.getPropertyValue("req-time")).getTime() + TimeZone.getDefault().getRawOffset()); } return date; } catch(ParseException e) { return getUpdated(); } } HpAlmTask(Project project, Entity entity); boolean isInitialized(); String getId(); String getSummary(); String getDescription(); Comment[] getComments(); Icon getIcon(); TaskType getType(); Date getUpdated(); Date getCreated(); boolean isClosed(); String getCustomIcon(); boolean isIssue(); String getIssueUrl(); static Date parseDate(String dateStr); static String getDescriptionField(String entityType); }
HpAlmTask extends Task { public Date getCreated() { try { Date date = CommentField.dateFormat.parse(entity.getPropertyValue("creation-time")); if("requirement".equals(entity.getType())) { return new Date(date.getTime() + timeFormat.parse(entity.getPropertyValue("req-time")).getTime() + TimeZone.getDefault().getRawOffset()); } return date; } catch(ParseException e) { return getUpdated(); } } HpAlmTask(Project project, Entity entity); boolean isInitialized(); String getId(); String getSummary(); String getDescription(); Comment[] getComments(); Icon getIcon(); TaskType getType(); Date getUpdated(); Date getCreated(); boolean isClosed(); String getCustomIcon(); boolean isIssue(); String getIssueUrl(); static Date parseDate(String dateStr); static String getDescriptionField(String entityType);  }