@Test public void shouldGetReportingRoles() throws Exception { RoleAssignment expected = new RoleAssignment(); when(mapper.getReportingRole(1L)).thenReturn(expected); RoleAssignment actual = repository.getReportingRole(1L); assertThat(actual, is(expected)); }
public RoleAssignment getReportingRole(Long userId) { return mapper.getReportingRole(userId); }
RoleAssignmentRepository { public RoleAssignment getReportingRole(Long userId) { return mapper.getReportingRole(userId); } }
RoleAssignmentRepository { public RoleAssignment getReportingRole(Long userId) { return mapper.getReportingRole(userId); } @Autowired  RoleAssignmentRepository(RoleAssignmentMapper roleAssignmentMapper); }
RoleAssignmentRepository { public RoleAssignment getReportingRole(Long userId) { return mapper.getReportingRole(userId); } @Autowired  RoleAssignmentRepository(RoleAssignmentMapper roleAssignmentMapper); List<RoleAssignment> getRoleAssignmentsForUserWithRight(String rightName, Long userId); void deleteAllRoleAssignmentsForUser(Long id); List<RoleAssignment> getSupervisorRoles(Long userId); List<RoleAssignment> getHomeFacilityRoles(Long userId); List<RoleAssignment> getHomeFacilityRolesForUserOnGivenProgramWithRights(Long userId, Long programId, String... rightNames); RoleAssignment getAdminRole(Long userId); RoleAssignment getReportRole(Long userId); void insert(List<RoleAssignment> roleAssignments, final Long userId); List<RoleAssignment> getAllocationRoles(Long userId); RoleAssignment getReportingRole(Long userId); }
RoleAssignmentRepository { public RoleAssignment getReportingRole(Long userId) { return mapper.getReportingRole(userId); } @Autowired  RoleAssignmentRepository(RoleAssignmentMapper roleAssignmentMapper); List<RoleAssignment> getRoleAssignmentsForUserWithRight(String rightName, Long userId); void deleteAllRoleAssignmentsForUser(Long id); List<RoleAssignment> getSupervisorRoles(Long userId); List<RoleAssignment> getHomeFacilityRoles(Long userId); List<RoleAssignment> getHomeFacilityRolesForUserOnGivenProgramWithRights(Long userId, Long programId, String... rightNames); RoleAssignment getAdminRole(Long userId); RoleAssignment getReportRole(Long userId); void insert(List<RoleAssignment> roleAssignments, final Long userId); List<RoleAssignment> getAllocationRoles(Long userId); RoleAssignment getReportingRole(Long userId);  }