Package com.taskadapter.redmineapi.bean

Examples of com.taskadapter.redmineapi.bean.Journal


    return result;
  }

  public static Journal parseJournal(JSONObject content) throws JSONException {
    final Journal result = JournalFactory.create(JsonInput.getInt(content, "id"));
    result.setCreatedOn(getDateOrNull(content, "created_on"));
    result.setNotes(JsonInput.getStringOrNull(content, "notes"));
    result.setUser(JsonInput.getObjectOrNull(content, "user", USER_PARSER));
    result.addDetails(JsonInput.getListOrEmpty(content, "details", JOURNAL_DETAIL_PARSER));
    return result;
  }
View Full Code Here


            Issue loadedIssueWithJournals2 = issueManager.getIssueById(newIssue.getId(),
                    Include.journals);
            assertEquals(1, loadedIssueWithJournals2.getJournals()
                    .size());

            Journal journalItem = loadedIssueWithJournals2.getJournals().iterator().next();
            assertEquals(commentDescribingTheUpdate, journalItem.getNotes());
            User ourUser = IntegrationTestHelper.getOurUser();
            // can't compare User objects because either of them is not
            // completely filled
            assertEquals(ourUser.getId(), journalItem.getUser().getId());
            assertEquals(ourUser.getFirstName(), journalItem.getUser()
                    .getFirstName());
            assertEquals(ourUser.getLastName(), journalItem.getUser()
                    .getLastName());
            assertEquals(1, journalItem.getDetails().size());
            final JournalDetail journalDetail = journalItem.getDetails().get(0);
            assertEquals("new subject", journalDetail.getNewValue());
            assertEquals("subject", journalDetail.getName());
            assertEquals("attr", journalDetail.getProperty());

            Issue loadedIssueWithoutJournals = issueManager.getIssueById(newIssue.getId());
View Full Code Here

TOP

Related Classes of com.taskadapter.redmineapi.bean.Journal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.