This commit is contained in:
Zeeshaun
2026-03-13 09:11:35 -05:00
parent f004c8205a
commit c2d6bda458
197 changed files with 14970 additions and 0 deletions
@@ -0,0 +1,19 @@
using OwnerNumberMigration.ValueParsing;
namespace OwnerNumberMigrationTest.TestDoubles;
public class FakeParsingStrategy<T> : IValueParsingStrategy<T>
{
public IDictionary<string, T> Values { get; } = new Dictionary<string, T>();
private readonly Func<T> _newT;
public FakeParsingStrategy(Func<T> newT)
{
this._newT = newT;
}
public T Parse(string value) => Values.TryGetValue(value, out var parsed)
? parsed
: _newT();
}