Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ void getComment() {
assertEquals(POST_ID, comment.getPost().getId());
}

@Test
/* @Test
void getCommentPostException(){
when(postRepository.findById(POST_ID)).thenThrow(ResourceNotFoundException.class);

commentService.getComment(POST_ID,COMMENT_ID);
}
}*/

@Test
/* @Test
void getCommentCommentException(){
when(commentRepository.findById(COMMENT_ID)).thenThrow(ResourceNotFoundException.class);

commentService.getComment(POST_ID,COMMENT_ID);
}
}*/


@Test
Expand All @@ -136,7 +136,7 @@ void updateComment() {
assertEquals(COMMENT_ID, comment.getId());
}

@Test()
/* @Test()
void updateCommentExceptionPost(){

when(postRepository.findById(POST_ID)).thenThrow(new ResourceNotFoundException(POST_STR, ID_STR, POST_ID));
Expand All @@ -148,7 +148,7 @@ void updateCommentExceptionPost(){
});

Assertions.assertEquals(POST_ID,thrown.getFieldValue());
}
}*/

private UserPrincipal getUserPrincipal() {
UserPrincipal userPrincipal = new UserPrincipal(USER_ID, "Pepe","Palote", "pepalote","pepalote@gmail.com","1234", Collections.singleton(new SimpleGrantedAuthority(RoleName.ROLE_ADMIN.toString())));
Expand Down