using ZB.MOM.WW.OtOpcUa.Client.Shared;

namespace ZB.MOM.WW.OtOpcUa.Client.CLI.Tests.Fakes;

/// <summary>
///     Fake factory that returns a pre-configured <see cref="FakeOpcUaClientService" /> for testing.
/// </summary>
public sealed class FakeOpcUaClientServiceFactory : IOpcUaClientServiceFactory
{
    private readonly FakeOpcUaClientService _service;

    /// <summary>Initializes a new instance of the <see cref="FakeOpcUaClientServiceFactory"/> class.</summary>
    /// <param name="service">The fake OPC UA client service to return.</param>
    public FakeOpcUaClientServiceFactory(FakeOpcUaClientService service)
    {
        _service = service;
    }

    /// <summary>Creates and returns the fake OPC UA client service.</summary>
    public IOpcUaClientService Create()
    {
        return _service;
    }
}