/** * Constructs a new <code>StatusReport</code> for the subject and sets the created date to the * current date. * * @param subject * the subject of the report */ public StatusReport(SUBJECT subject) { this.subject = subject; setCreatedDate(new Date()); }
Date createdDate = getDate(json, "createdDate"); if (createdDate != null) report.setCreatedDate(createdDate);
/** * Test method for {@link org.apache.taverna.platform.report.StatusReport#setCreatedDate(java.util.Date)}. */ @Test public void testSetCreatedDate() { Date now = new Date(); statusReport.setCreatedDate(now); assertEquals(now, statusReport.getCreatedDate()); assertEquals(State.CREATED, statusReport.getState()); }