diff --git a/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs b/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs index 65244f8..1b74fd9 100644 --- a/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs +++ b/server/tests/Vanguard.Server.Tests/OrleansMatchTests.cs @@ -1,8 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; using Orleans.Hosting; using Orleans.TestingHost; -using Vanguard.Rules.Cards; using Vanguard.Rules.Engine; using Vanguard.Server.Configuration; using Vanguard.Server.Matches; @@ -14,17 +12,14 @@ namespace Vanguard.Server.Tests; public class OrleansMatchTests { - private static readonly DateTimeOffset Start = new(2026, 10, 21, 12, 0, 0, TimeSpan.Zero); - [Fact] public async Task Grain_Initializes_Attaches_And_Submits_Intent() { - var time = new FakeTimeProvider(Start); var connections = new MatchConnectionRegistry(); var results = new RecordingResultSink(); var builder = new TestClusterBuilder(); - SiloConfigurator.Set(time, connections, results); + SiloConfigurator.Set(connections, results); builder.AddSiloBuilderConfigurator(); var cluster = builder.Build(); @@ -80,36 +75,26 @@ public class OrleansMatchTests private sealed class SiloConfigurator : ISiloConfigurator { - private static FakeTimeProvider _time = null!; private static IMatchConnectionRegistry _connections = null!; private static IMatchResultSink _results = null!; public static void Set( - FakeTimeProvider time, IMatchConnectionRegistry connections, IMatchResultSink results) { - _time = time; _connections = connections; _results = results; } public void Configure(ISiloBuilder siloBuilder) { - siloBuilder.ConfigureLogging(logging => - { - logging.ClearProviders(); - logging.AddConsole(); - logging.SetMinimumLevel(LogLevel.Debug); - }); - siloBuilder.ConfigureServices(services => { var options = ServerTestData.SmallOptions(); services.AddSingleton(ServerTestData.Catalog); services.AddSingleton(options); - services.AddSingleton(_time); + services.AddSingleton(TimeProvider.System); services.AddSingleton(_results); services.AddSingleton(); services.AddSingleton(_connections);