Package com.streamreduce.rest.dto.response

Examples of com.streamreduce.rest.dto.response.MessageCommentsResponseDTO


        } catch (MessageNotFoundException e) {
            return error(e.getMessage(), Response.status(Response.Status.NOT_FOUND));
        }

        MessageCommentsResponseDTO dto = new MessageCommentsResponseDTO();
        List<MessageCommentResponseDTO> allComments = new ArrayList<>();
        for (MessageComment comment : sobaMessage.getComments()) {
            allComments.add(comment.toDTO());
        }

        dto.setComments(allComments);

        return Response
                .ok(dto)
                .build();
    }
View Full Code Here


        applicationManager.getMessageService().updateMessage(getTestUser().getAccount(), sobaMessage);

        String url = getUrl() + "/" + userMessage.getMessageId() + "/comment";
        String response = makeRequest(url, "GET", null, authToken);

        MessageCommentsResponseDTO commentsResponseDTO = jsonToObject(response,
                TypeFactory.defaultInstance().constructType(MessageCommentsResponseDTO.class));

        assertEquals(num, commentsResponseDTO.getComments().size());

    }
View Full Code Here

TOP

Related Classes of com.streamreduce.rest.dto.response.MessageCommentsResponseDTO

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.