@Test public void testGetAllUserFeedback() throws Exception { FeedbackImpl feedbackImpl = new FeedbackImpl(feedbackRepository, userDirectory); List<UserFeedback> userFeedbackList = new ArrayList<>(); userFeedbackList.add(userFeedback); when(feedbackRepository.getAllUserFeedback()).thenReturn(userFeedbackList); List<UserFeedback> returned = feedbackImpl.getAllUserFeedback(); assert (returned.equals(userFeedbackList)); doThrow(RepositoryException.class).when(feedbackRepository).getAllUserFeedback(); verifyException(feedbackImpl, RepositoryException.class).getAllUserFeedback(); }
@Override public List<UserFeedback> getAllUserFeedback() { return feedbackRepository.getAllUserFeedback(); }
FeedbackImpl implements Feedback { @Override public List<UserFeedback> getAllUserFeedback() { return feedbackRepository.getAllUserFeedback(); } }
FeedbackImpl implements Feedback { @Override public List<UserFeedback> getAllUserFeedback() { return feedbackRepository.getAllUserFeedback(); } @Inject  FeedbackImpl(final FeedbackRepository feedbackRepository, final UserDirectory userDirectory); }
FeedbackImpl implements Feedback { @Override public List<UserFeedback> getAllUserFeedback() { return feedbackRepository.getAllUserFeedback(); } @Inject  FeedbackImpl(final FeedbackRepository feedbackRepository, final UserDirectory userDirectory); @Override void createUserFeedback(UserFeedback userFeedback); @Override List<UserFeedback> getUserFeedback(UserInfo.Username username); @Override List<UserFeedback> getAllUserFeedback(); }
FeedbackImpl implements Feedback { @Override public List<UserFeedback> getAllUserFeedback() { return feedbackRepository.getAllUserFeedback(); } @Inject  FeedbackImpl(final FeedbackRepository feedbackRepository, final UserDirectory userDirectory); @Override void createUserFeedback(UserFeedback userFeedback); @Override List<UserFeedback> getUserFeedback(UserInfo.Username username); @Override List<UserFeedback> getAllUserFeedback();  }