@Override public Document removeCommentFromAlert(CommentAddRemoveRequest request, Document latest) throws IOException { return getUpdateDao().removeCommentFromAlert(request, latest); }
@Override public Document removeCommentFromAlert(CommentAddRemoveRequest request, Document latest) throws IOException { return getUpdateDao().removeCommentFromAlert(request, latest); }
@Override public Document removeCommentFromAlert(CommentAddRemoveRequest request) throws IOException { return getUpdateDao().removeCommentFromAlert(request); }
@Override public Document removeCommentFromAlert(CommentAddRemoveRequest request) throws IOException { return getUpdateDao().removeCommentFromAlert(request); }
@Test public void removeCommentShouldThrowExceptionOnEmptyComments() throws Exception { exception.expect(IOException.class); exception.expectMessage("Unable to remove comment. Document with guid guid has no comments."); CommentAddRemoveRequest request = new CommentAddRemoveRequest(); request.setGuid("guid"); Document latest = new Document(new HashMap<>(), "guid", "bro", System.currentTimeMillis()); getUpdateDao().removeCommentFromAlert(request, latest); }
@Test public void removeCommentShouldThrowExceptionOnMissingAlert() throws Exception { exception.expect(IOException.class); exception.expectMessage("Unable to remove comment. Document with guid guid cannot be found."); CommentAddRemoveRequest request = new CommentAddRemoveRequest(); request.setGuid("guid"); getUpdateDao().removeCommentFromAlert(request, null); }