@Test public void assertCanAccessProject_if_member_is_ok() { // GIVEN Project project = new Project(); project.setOwnerId(498464L); project.setMembersIds(Lists.newArrayList(USER_ID)); when(this.mockProjectRepository.findOne(PROJECT_ID)).thenReturn(project); // WHEN this.authorizationService.assertCanAccessProject(USER_ID, PROJECT_ID); // THEN // Nothing happens }
@Test public void assertCanAccessTodo_if_member_of_the_project_is_ok() { // GIVEN Project project = new Project(); project.setOwnerId(849464L); project.setMembersIds(Lists.newArrayList(USER_ID)); when(this.mockTodoRepository.findProject(TODO_ID)).thenReturn(project); // WHEN this.authorizationService.assertCanAccessTodo(USER_ID, TODO_ID); // THEN // Nothing happens }