using ZB.MOM.WW.Secrets.Abstractions;

namespace ZB.MOM.WW.Secrets.Tests.Fakes;

/// <summary>
/// An <see cref="ISecretActorAccessor"/> test double that reports a fixed (or <c>null</c>) actor.
/// </summary>
public sealed class FixedActorAccessor : ISecretActorAccessor
{
    /// <summary>Creates an accessor that always reports <paramref name="actor"/>.</summary>
    /// <param name="actor">The actor to report, or <c>null</c>.</param>
    public FixedActorAccessor(string? actor) => CurrentActor = actor;

    /// <inheritdoc />
    public string? CurrentActor { get; }
}
