refactor(store): route MessageStore IsWine probe through IPlatformUtil (F12.1)

MessageStore.Connect used to call Util.IsWine() directly via a
DalamudUtil alias, which made the ctor unreachable from the xUnit
test AppDomain: any test that allocated a MessageStore tripped a
FileNotFoundException on Dalamud.dll before reaching the assertion.

The ctor now takes an IPlatformUtil and reads the cached IsWine
property. MessageManager passes Plugin.PlatformUtil in. Production
behaviour is identical; the test path can now substitute a fake
and exercise the SQLite migration logic in isolation.
This commit is contained in:
2026-05-12 20:29:22 +02:00
parent 6b44f549b4
commit 4510c1e404
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ internal class MessageManager : IAsyncDisposable
{
Plugin = plugin;
Store = new MessageStore(DatabasePath());
Store = new MessageStore(DatabasePath(), Plugin.PlatformUtil);
PendingMessageThread = new Thread(() =>
ProcessPendingMessages(PendingThreadCancellationToken.Token)