From 2d7da21ee19a0868e9506a4b3381af092f2fe0b5 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 1 Aug 2025 10:56:57 -0400 Subject: [PATCH] Fix MapThreadsVersion unit test --- tests/Tgstation.Server.Tests/TestVersions.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/Tgstation.Server.Tests/TestVersions.cs b/tests/Tgstation.Server.Tests/TestVersions.cs index d44fded9e2..c4d0524f16 100644 --- a/tests/Tgstation.Server.Tests/TestVersions.cs +++ b/tests/Tgstation.Server.Tests/TestVersions.cs @@ -204,10 +204,16 @@ namespace Tgstation.Server.Tests var fileDownloader = new CachingFileDownloader(Mock.Of>()); + var mockIOManager = new Mock(); + mockIOManager.Setup(x => x.FileExists(It.IsNotNull(), It.IsAny())).ReturnsAsync(true); + mockIOManager.Setup(x => x.CreateResolverForSubdirectory(It.IsNotNull())).Returns(mockIOManager.Object); + mockIOManager.Setup(x => x.ConcatPath(It.IsNotNull())).Returns(Path.Combine); + mockIOManager.Setup(x => x.ResolvePath(It.IsNotNull())).Returns(path => path); + ByondInstallerBase byondInstaller = platformIdentifier.IsWindows ? new WindowsByondInstaller( Mock.Of(), - Mock.Of(), + mockIOManager.Object, fileDownloader, mockGeneralConfigurationOptions.Object, mockSessionConfigurationOptions.Object, @@ -227,7 +233,7 @@ namespace Tgstation.Server.Tests new Lazy(() => null), new DefaultIOManager(new FileSystem()), loggerFactory.CreateLogger()), - Mock.Of(), + mockIOManager.Object, loggerFactory.CreateLogger(), loggerFactory);