Moved dao methods

This commit is contained in:
2026-04-08 23:22:33 +02:00
parent e10f05adb5
commit 855b7c8bea
8 changed files with 155 additions and 148 deletions

View File

@@ -296,9 +296,9 @@ void main() {
test('Setting a winner works correctly', () async {
await database.matchDao.addMatch(match: testMatch1);
await database.matchDao.setWinner(
await database.scoreDao.setWinner(
matchId: testMatch1.id,
winnerId: testPlayer5.id,
playerId: testPlayer5.id,
);
final fetchedMatch = await database.matchDao.getMatchById(

View File

@@ -357,13 +357,11 @@ void main() {
playerId: testPlayer1.id,
matchId: match1.id,
teamId: testTeam1.id,
score: 0,
);
await database.playerMatchDao.addPlayerToMatch(
playerId: testPlayer2.id,
matchId: match1.id,
teamId: testTeam1.id,
score: 0,
);
// Associate players with teams through match2
@@ -372,13 +370,11 @@ void main() {
playerId: testPlayer1.id,
matchId: match2.id,
teamId: testTeam3.id,
score: 0,
);
await database.playerMatchDao.addPlayerToMatch(
playerId: testPlayer3.id,
matchId: match2.id,
teamId: testTeam3.id,
score: 0,
);
final team1 = await database.teamDao.getTeamById(teamId: testTeam1.id);