@Test public void testShouldGetModules() throws UnsupportedEncodingException, JSONException { ActionRequest actionRequest = new ActionRequest(); actionRequest.setRequestInfo(getRequestInfo()); when(actionRepository.getAllActions(actionRequest)).thenReturn(getActionList()); List<Action> actions = actionService.getAllActions(actionRequest); assertThat(getActionList().size() == actions.size()); assertThat(actions.equals(getActionList())); }
public List<Action> getAllActions(final ActionRequest actionRequest) { return actionRepository.getAllActions(actionRequest); }
ActionService { public List<Action> getAllActions(final ActionRequest actionRequest) { return actionRepository.getAllActions(actionRequest); } }
ActionService { public List<Action> getAllActions(final ActionRequest actionRequest) { return actionRepository.getAllActions(actionRequest); } @Autowired  ActionService(BaseRepository repository, ActionRepository actionRepository, MdmsRepository mdmsRepository); }
ActionService { public List<Action> getAllActions(final ActionRequest actionRequest) { return actionRepository.getAllActions(actionRequest); } @Autowired  ActionService(BaseRepository repository, ActionRepository actionRepository, MdmsRepository mdmsRepository); List<Action> getActions(ActionSearchCriteria actionSearchCriteria); ActionValidation validate(ValidateActionCriteria criteria); List<Action> createAction(ActionRequest actionRequest); List<Action> updateAction(ActionRequest actionRequest); boolean checkActionNameExit(String name); boolean checkCombinationOfUrlAndqueryparamsExist(String url, String queryParams); List<Module> getAllActionsBasedOnRoles(final ActionRequest actionRequest); List<Action> getAllActions(final ActionRequest actionRequest); List<Action> getAllMDMSActions(final ActionRequest actionRequest); boolean isAuthorized(AuthorizationRequest authorizeRequest); }
ActionService { public List<Action> getAllActions(final ActionRequest actionRequest) { return actionRepository.getAllActions(actionRequest); } @Autowired  ActionService(BaseRepository repository, ActionRepository actionRepository, MdmsRepository mdmsRepository); List<Action> getActions(ActionSearchCriteria actionSearchCriteria); ActionValidation validate(ValidateActionCriteria criteria); List<Action> createAction(ActionRequest actionRequest); List<Action> updateAction(ActionRequest actionRequest); boolean checkActionNameExit(String name); boolean checkCombinationOfUrlAndqueryparamsExist(String url, String queryParams); List<Module> getAllActionsBasedOnRoles(final ActionRequest actionRequest); List<Action> getAllActions(final ActionRequest actionRequest); List<Action> getAllMDMSActions(final ActionRequest actionRequest); boolean isAuthorized(AuthorizationRequest authorizeRequest);  }