@Test public void testShoudCreateRoleActions() { List<RoleAction> roleActions = new ArrayList<RoleAction>(); RoleAction action = new RoleAction(); action.setRoleCode("CITIZEN"); action.setActionId(1); action.setTenantId("default"); roleActions.add(action); RoleAction action1 = new RoleAction(); action1.setRoleCode("CITIZEN"); action1.setActionId(2); action1.setTenantId("default"); roleActions.add(action); RoleActionsRequest roleRequest = new RoleActionsRequest(); when(roleActionRepository.createRoleActions(any(RoleActionsRequest.class))).thenReturn(roleActions); List<RoleAction> rolesList = roleActionService.createRoleActions(roleRequest); assertThat(rolesList).isEqualTo(roleActions); }
public List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest) { return roleActionRepository.createRoleActions(rolActionRequest); }
RoleActionService { public List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest) { return roleActionRepository.createRoleActions(rolActionRequest); } }
RoleActionService { public List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest) { return roleActionRepository.createRoleActions(rolActionRequest); } @Autowired  RoleActionService(RoleActionRepository roleActionRepository); }
RoleActionService { public List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest) { return roleActionRepository.createRoleActions(rolActionRequest); } @Autowired  RoleActionService(RoleActionRepository roleActionRepository); List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest); boolean checkActionNamesAreExistOrNot(final RoleActionsRequest roleActionRequest); boolean addUniqueValidationForTenantAndRoleAndAction(final RoleActionsRequest rolActionRequest); }
RoleActionService { public List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest) { return roleActionRepository.createRoleActions(rolActionRequest); } @Autowired  RoleActionService(RoleActionRepository roleActionRepository); List<RoleAction> createRoleActions(final RoleActionsRequest rolActionRequest); boolean checkActionNamesAreExistOrNot(final RoleActionsRequest roleActionRequest); boolean addUniqueValidationForTenantAndRoleAndAction(final RoleActionsRequest rolActionRequest);  }