private Comment createComment(int i, UUID targetId) { Comment comment = new Comment(); comment.setTargetId(targetId); comment.setAuthor("Pretentious Douchebag " + i); comment.setContent("This test sucks. 0/5 would not test again."); comment.setImage(bitmap); return comment; }
public void testDeleteComment() throws Exception { Comment c = new Comment(); c.setAuthor("lolcat"); c.setContent("Can I haz ID?"); c.setTargetId(UUID.randomUUID()); c.setId(UUID.randomUUID()); boolean result = es.putComment(c); assertTrue(es.getErrorMessage(), result); System.out.println("Comment ID: " + c.getId()); result = es.deleteComment(c.getId()); assertTrue(es.getErrorMessage(), result); }