mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Refactor group existence checks and add group repo tests
Renamed IGroupsExist and related methods from Exists to Exist for consistency. Added integration tests for GroupRepository. Introduced entity configurations for ChatGroup, GroupAdmins, GroupInvitation, and updated GroupMembership configuration. Updated usages and tests to match new method names and improved equality checks for ChatGroup.
This commit is contained in:
@@ -11,4 +11,16 @@ public class ChatGroup
|
||||
public List<GroupAdmins> Admins { get; set; } = new();
|
||||
public List<GroupMembership> Members { get; set; } = new();
|
||||
public List<GroupInvitation> InviteCodes { get; set; } = new();
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
ChatGroup chatGroup = obj as ChatGroup;
|
||||
|
||||
return Id == chatGroup.Id &&
|
||||
Name == chatGroup.Name &&
|
||||
Description == chatGroup.Description &&
|
||||
ImageId == chatGroup.ImageId &&
|
||||
IsChannel == chatGroup.IsChannel &&
|
||||
IsPrivate == chatGroup.IsPrivate;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user