@Override public CommentEntity anInvalidResource() { Comment comment = theUser(user) .commentTheResource(CONTENT_ID) .inComponent(COMPONENT_INSTANCE_ID) .withAsText("ceci est un commentaire"); comment.setCommentPK(new CommentPK("3", COMPONENT_INSTANCE_ID)); return CommentEntity.fromComment(comment); }
@Before public void prepareTestResources() { user = save(aUser()); sessionKey = authenticate(user); Comment commentToUseInTest = theUser(user) .commentTheResource(CONTENT_ID) .inComponent(COMPONENT_INSTANCE_ID) .withAsText("ceci est un commentaire"); getTestResources().save(commentToUseInTest); theComment = CommentEntity.fromComment(commentToUseInTest); }