@Test public void testShouldReturnActionsForUserRole() throws Exception { ActionSearchCriteria actionSearchCriteria = ActionSearchCriteria.builder().build(); List<Object> actionsExpected = getActions(); ActionFinderQueryBuilder queryBuilder = new ActionFinderQueryBuilder(actionSearchCriteria); when(repository.run(Mockito.any(ActionFinderQueryBuilder.class), Mockito.any(ActionRowMapper.class))) .thenReturn(actionsExpected); List<Action> actualActions = actionService.getActions(actionSearchCriteria); assertEquals(actionsExpected, actualActions); }
public List<Action> getActions(ActionSearchCriteria actionSearchCriteria) { ActionFinderQueryBuilder queryBuilder = new ActionFinderQueryBuilder(actionSearchCriteria); return (List<Action>) (List<?>) repository.run(queryBuilder, new ActionRowMapper()); }
ActionService { public List<Action> getActions(ActionSearchCriteria actionSearchCriteria) { ActionFinderQueryBuilder queryBuilder = new ActionFinderQueryBuilder(actionSearchCriteria); return (List<Action>) (List<?>) repository.run(queryBuilder, new ActionRowMapper()); } }
ActionService { public List<Action> getActions(ActionSearchCriteria actionSearchCriteria) { ActionFinderQueryBuilder queryBuilder = new ActionFinderQueryBuilder(actionSearchCriteria); return (List<Action>) (List<?>) repository.run(queryBuilder, new ActionRowMapper()); } @Autowired  ActionService(BaseRepository repository, ActionRepository actionRepository, MdmsRepository mdmsRepository); }
ActionService { public List<Action> getActions(ActionSearchCriteria actionSearchCriteria) { ActionFinderQueryBuilder queryBuilder = new ActionFinderQueryBuilder(actionSearchCriteria); return (List<Action>) (List<?>) repository.run(queryBuilder, new ActionRowMapper()); } @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> getActions(ActionSearchCriteria actionSearchCriteria) { ActionFinderQueryBuilder queryBuilder = new ActionFinderQueryBuilder(actionSearchCriteria); return (List<Action>) (List<?>) repository.run(queryBuilder, new ActionRowMapper()); } @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);  }