Files
monorepo/LCU.API.Internal.Document/OwnerNumberMigrationTest/TestDoubles/FakeMigrationObserver.cs
T
2026-03-13 09:11:35 -05:00

27 lines
642 B
C#

using LCU.API.Internal.DocumentLib.Containers;
namespace OwnerNumberMigrationTest.TestDoubles;
public class FakeMigrationObserver : IObserver<DocumentInformation>
{
public List<(DocumentInformation doc, DateTime started)> Documents { get; } = new();
public List<Exception> Errors { get; } = new();
public List<DateTime> Completions { get; } = new();
public void OnCompleted()
{
Completions.Add(DateTime.Now);
}
public void OnError(Exception error)
{
Errors.Add(error);
}
public void OnNext(DocumentInformation value)
{
Documents.Add((value, DateTime.Now));
}
}