From 2f0a2abe7adc30e5723fa697bc0a4ce709aac9b8 Mon Sep 17 00:00:00 2001 From: MSWS Date: Mon, 9 Sep 2024 16:58:54 -0700 Subject: [PATCH] Fix compiler warnings --- src/GangsImpl/AbstractDB/DBRank.cs | 2 +- src/GangsTest/API/Services/Commands/Command/TestData.cs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/GangsImpl/AbstractDB/DBRank.cs b/src/GangsImpl/AbstractDB/DBRank.cs index 60812a8..9660468 100644 --- a/src/GangsImpl/AbstractDB/DBRank.cs +++ b/src/GangsImpl/AbstractDB/DBRank.cs @@ -4,7 +4,7 @@ namespace GenericDB; public class DBRank : IGangRank { public int GangId { get; init; } - public string Name { get; init; } + public required string Name { get; init; } public int Rank { get; init; } public IGangRank.Permissions Perms { get; init; } diff --git a/src/GangsTest/API/Services/Commands/Command/TestData.cs b/src/GangsTest/API/Services/Commands/Command/TestData.cs index f4933b7..447f449 100644 --- a/src/GangsTest/API/Services/Commands/Command/TestData.cs +++ b/src/GangsTest/API/Services/Commands/Command/TestData.cs @@ -12,10 +12,6 @@ namespace GangsTest.API.Services.Commands.Command; public class TestData : TheoryData { private static readonly IPlayerManager playerMgr = new MockPlayerManager(); - - private static readonly IGangManager manager = - new MockGangManager(playerMgr, rankMgr); - private static readonly IMenuManager menuMgr = new MockMenuManager(); private static readonly IPlayerStatManager statMgr = @@ -23,6 +19,9 @@ public class TestData : TheoryData { private static readonly IRankManager rankMgr = new MockRankManager(playerMgr); + private static readonly IGangManager manager = + new MockGangManager(playerMgr, rankMgr); + private readonly ICommand[] behaviors = [ new CreateCommand(manager, StringLocalizer.Instance), new HelpCommand(), new GangCommand(manager, playerMgr, menuMgr, StringLocalizer.Instance),