Added methods for multiple inserts to tests
This commit is contained in:
@@ -94,10 +94,8 @@ void main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: Use upcoming addGames() method
|
|
||||||
test('Adding and fetching multiple games works correclty', () async {
|
test('Adding and fetching multiple games works correclty', () async {
|
||||||
await database.gameDao.addGame(game: testgame);
|
await database.gameDao.addGames(games: [testgame, testgame2]);
|
||||||
await database.gameDao.addGame(game: testgame2);
|
|
||||||
|
|
||||||
final allGames = await database.gameDao.getAllGames();
|
final allGames = await database.gameDao.getAllGames();
|
||||||
expect(allGames.length, 2);
|
expect(allGames.length, 2);
|
||||||
|
|||||||
@@ -68,10 +68,8 @@ void main() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: Use upcoming addGroups() method
|
|
||||||
test('Adding and fetching a single group works correctly', () async {
|
test('Adding and fetching a single group works correctly', () async {
|
||||||
await database.groupDao.addGroup(group: testgroup);
|
await database.groupDao.addGroups(groups: [testgroup, testgroup2]);
|
||||||
await database.groupDao.addGroup(group: testgroup2);
|
|
||||||
|
|
||||||
final allGroups = await database.groupDao.getAllGroups();
|
final allGroups = await database.groupDao.getAllGroups();
|
||||||
expect(allGroups.length, 2);
|
expect(allGroups.length, 2);
|
||||||
|
|||||||
@@ -51,10 +51,8 @@ void main() {
|
|||||||
expect(fetchedPlayer2.createdAt, testPlayer2.createdAt);
|
expect(fetchedPlayer2.createdAt, testPlayer2.createdAt);
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: Use upcoming addPlayers() method
|
|
||||||
test('Adding and fetching multiple players works correclty', () async {
|
test('Adding and fetching multiple players works correclty', () async {
|
||||||
await database.playerDao.addPlayer(player: testPlayer);
|
await database.playerDao.addPlayers(players: [testPlayer, testPlayer2]);
|
||||||
await database.playerDao.addPlayer(player: testPlayer2);
|
|
||||||
|
|
||||||
final allPlayers = await database.playerDao.getAllPlayers();
|
final allPlayers = await database.playerDao.getAllPlayers();
|
||||||
expect(allPlayers.length, 2);
|
expect(allPlayers.length, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user