Files
StarterNG/StarterNG.Tests/Fakes/TestLog.cs
maj00r 07987a60a9 Write settings, presets and favourites whole or not at all
A failed write leaves the old file in place. Settings that could not be read
are not saved over. UI exceptions reach the log. Started from a shortcut set
up elsewhere, the starter moves to its own folder when only that one holds a
game.
2026-11-01 16:06:15 +01:00

13 lines
531 B
C#

using StarterNG.Application.Abstractions;
using StarterNG.Infrastructure.Adapters;
namespace StarterNG.Tests.Fakes;
/// <summary>The diagnostics log for a test that only wants one to write to or read back.</summary>
public static class TestLog
{
/// <param name="files">Where the log file goes; a disk of its own when left out.</param>
public static FileDiagnosticsLog Over(IFileSystem? files = null) =>
new(files ?? new InMemoryFileSystem(), new FixedClock(new DateTime(2026, 10, 13)), new GamePaths("game"));
}