tests: add mucho tests

This commit is contained in:
Stevan Freeborn
2026-02-06 06:53:20 -06:00
parent b2086d8185
commit 5b1a5f003e
26 changed files with 1983 additions and 18 deletions
@@ -0,0 +1,27 @@
namespace FiscalOS.Infra.Tests.Mocks;
internal sealed class MockOptionsMonitor<T> : IOptionsMonitor<T> where T : new()
{
private Action<T, string>? _listener;
public T CurrentValue
{
get;
set
{
field = value;
_listener?.Invoke(field, string.Empty);
}
} = new();
public T Get(string? name)
{
return CurrentValue;
}
public IDisposable? OnChange(Action<T, string> listener)
{
_listener = listener;
return new Mock<IDisposable>().Object;
}
}