20 lines
671 B
C#
20 lines
671 B
C#
using w4c_workflows.Services.Nodes.Binary;
|
|
|
|
namespace w4c_workflows.Tests;
|
|
|
|
/// <summary>
|
|
/// Builds an isolated <see cref="FileSystemBinaryStore"/> in a fresh temp
|
|
/// directory per call, so binary tests never share state or touch the repo.
|
|
/// </summary>
|
|
internal static class BinaryTestData
|
|
{
|
|
public static FileSystemBinaryStore Store(Action<BinaryStoreOptions>? configure = null)
|
|
{
|
|
var root = Path.Combine(
|
|
Path.GetTempPath(), "w4c-binary-tests", Guid.NewGuid().ToString("N"));
|
|
var options = new BinaryStoreOptions { RootPath = root };
|
|
configure?.Invoke(options);
|
|
return new FileSystemBinaryStore(options);
|
|
}
|
|
}
|