Checkpoint: Added test to ExchangeRepo
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
5e459ac429
commit
76faedc40d
@ -21,4 +21,6 @@ public interface ExchangeRepository extends JpaRepository<Exchange, Long>{
|
|||||||
@Query("FROM Exchange WHERE ownerId = ?1")
|
@Query("FROM Exchange WHERE ownerId = ?1")
|
||||||
List<Exchange> getByUserId(@Param("id") Long id);
|
List<Exchange> getByUserId(@Param("id") Long id);
|
||||||
|
|
||||||
|
@Query("Select e1,e2 FROM Exchange e1, Exchange e2 WHERE e1.ownedAssignment.group.id = e2.desiredAssignment.id")
|
||||||
|
List<Object[]> getMatches();
|
||||||
}
|
}
|
||||||
|
@ -56,4 +56,8 @@ public class ExchangeService {
|
|||||||
public Optional<Exchange> checkForExchange(Assignment assignment, Groups group) {
|
public Optional<Exchange> checkForExchange(Assignment assignment, Groups group) {
|
||||||
return this.repo.checkForExchange(assignment, group);
|
return this.repo.checkForExchange(assignment, group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void performExchange() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user