mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-01 20:34:57 +01:00
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.
13 lines
531 B
C#
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"));
|
|
}
|