Package zendeskapi.models.tickets

Examples of zendeskapi.models.tickets.Comment


  }
 
  @Test
  public void testCreateUpdateAndDeleteRequest() throws Exception {
    Request request = new Request();
    Comment comment = new Comment();
    comment.setBody("Test comment 1");
    request.setSubject("Test request 1");
    request.setComment(comment);
    IndividualRequestResponse irr = API.getRequests().createRequest(request);
    Assert.assertTrue(irr.getRequest().getId() > 0);
   
    IndividualRequestResponse irrById = API.getRequests().getRequestById(irr.getRequest().getId());
    Assert.assertEquals(irrById.getRequest().getId(), irr.getRequest().getId());
   
    irrById.getRequest().setSubject("New Subject");
    Comment newComment = new Comment();
    newComment.setBody("something more to say");
    irrById.getRequest().setComment(newComment);
   
    API.getRequests().updateRequest(irrById.getRequest());
    GroupCommentResponse gcr = API.getRequests().getRequestCommentsById(irr.getRequest().getId());
    Assert.assertEquals(gcr.getComments().get(gcr.getComments().size()-1).getBody().replace("\n", ""), "something more to say");
View Full Code Here


//    ticket.setAssigneeId(USER_ID);
//    List<String> collaboratorEmails = new ArrayList<String>();
//    collaboratorEmails.add(COLLABORATOR_EMAIL);
//    ticket.setCollaboratorEmails(collaboratorEmails);
    String body = "Got it, thanks";
    Comment newComment = new Comment();
    newComment.setBody(body);
    newComment.setPublicComment(true);
    IndividualTicketResponse res = API.getTickets().updateTicket(ticket, newComment);
    Ticket updatedTicket = res.getTicket();
    Assert.assertNotNull(updatedTicket);
    Assert.assertEquals(res.getAudit().getEvents().get(0).getBody(), body);
View Full Code Here

TOP

Related Classes of zendeskapi.models.tickets.Comment

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.