mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-05 05:24:26 +01:00
Introduce layers, ports and a composition root
Ports in Application/Abstractions, adapters in Infrastructure, hand-wired AppServices (no reflection, as PublishAot requires). Adds a test project.
This commit is contained in:
16
StarterNG.Tests/Fakes/FixedClock.cs
Normal file
16
StarterNG.Tests/Fakes/FixedClock.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using StarterNG.Application.Abstractions;
|
||||
|
||||
namespace StarterNG.Tests.Fakes;
|
||||
|
||||
/// <summary>A clock frozen at a chosen instant.</summary>
|
||||
public sealed class FixedClock : IClock
|
||||
{
|
||||
public FixedClock(DateTime now)
|
||||
{
|
||||
Now = now;
|
||||
}
|
||||
|
||||
public DateTime Now { get; set; }
|
||||
|
||||
public DateTime UtcNow => Now.ToUniversalTime();
|
||||
}
|
||||
Reference in New Issue
Block a user