MVP #141

Merged
flixcoo merged 705 commits from development into main 2026-01-09 12:55:50 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 32f3f68da9 - Show all commits

View File

@@ -10,6 +10,9 @@ class PlayerGroupDao extends DatabaseAccessor<AppDatabase>
with _$PlayerGroupDaoMixin { with _$PlayerGroupDaoMixin {
PlayerGroupDao(super.db); PlayerGroupDao(super.db);
/// No need for a groupHasPlayers method since the members attribute is
/// not nullable
/// Adds a [player] to a group with the given [groupId]. /// Adds a [player] to a group with the given [groupId].
/// If the player is already in the group, no action is taken. /// If the player is already in the group, no action is taken.
/// If the player does not exist in the player table, they are added. /// If the player does not exist in the player table, they are added.

View File

@@ -41,6 +41,9 @@ void main() {
}); });
group('Player-Group Tests', () { group('Player-Group Tests', () {
/// No need to test if group has players since the members attribute is
/// not nullable
test('Adding a player to a group works correctly', () async { test('Adding a player to a group works correctly', () async {
await database.groupDao.addGroup(group: testgroup); await database.groupDao.addGroup(group: testgroup);
await database.playerDao.addPlayer(player: player4); await database.playerDao.addPlayer(player: player4);