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

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

/// <summary>
///     Fake factory that returns a preconfigured FakeOpcUaClientService.
/// </summary>
public sealed class FakeOpcUaClientServiceFactory : IOpcUaClientServiceFactory
{
    private readonly FakeOpcUaClientService _service;

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

    /// <summary>Creates an OPC UA client service instance.</summary>
    /// <returns>The preconfigured fake OPC UA client service.</returns>
    public IOpcUaClientService Create()
    {
        return _service;
    }
}