-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tests for PersistenceBase class * remove tests from QuarterPersistenceServiceIT which are already covered in PersistenceBaseTestIT * remove no longer used OrganisationXXX() methods * remove tests from TeamPersistenceServiceIT which are already covered in PersistenceBaseTestIT * remove tests from UserPersistenceServiceIT which are already covered in PersistenceBaseTestIT and add additional tests * remove tests from CheckInPersistenceServiceIT which are already covered in PersistenceBaseTestIT and add additional test * umbau ObjectivePersistenceServiceIT: remove tests which are already covered in PersistenceBaseTestIT, add additional test, make the tests readable * tests for AuthorizationCriteria * tests for AuthorizationCriteria * tests for AuthorizationCriteria * enable debug trace * debug found okr-champions in test * add logging in findAllOkrChampionsShouldReturnAllOkrChampions() test * disable tests which call setOkrChampion() * enable some disabled tests * enable some disabled tests * enable last disabled test .. should fail * ugly temp fix * cleanup * cleanup * cleanup * cleanup * cleanup * cleanup --------- Co-authored-by: peggimann <peggimann@puzzle.com>
- Loading branch information
1 parent
4f48c07
commit c9c738b
Showing
18 changed files
with
1,054 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
backend/src/main/java/ch/puzzle/okr/repository/TeamRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
package ch.puzzle.okr.repository; | ||
|
||
import ch.puzzle.okr.models.Team; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import java.util.List; | ||
|
||
public interface TeamRepository extends CrudRepository<Team, Long> { | ||
|
||
@Query(value = """ | ||
select distinct teamOrg.team_id from team_organisation teamOrg | ||
inner join organisation o on o.id = teamOrg.organisation_id | ||
where o.org_name in (:organisationNames) | ||
""", nativeQuery = true) | ||
List<Long> findTeamIdsByOrganisationNames(@Param("organisationNames") List<String> organisationNames); | ||
|
||
List<Team> findTeamsByName(String name); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
backend/src/main/java/ch/puzzle/okr/util/CollectionUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ch.puzzle.okr.util; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.StreamSupport; | ||
|
||
public class CollectionUtils { | ||
|
||
public static <T> List<T> iterableToList(Iterable<T> iterable) { | ||
return StreamSupport // | ||
.stream(iterable.spliterator(), false) // | ||
.collect(Collectors.toList()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.