using ZB.MOM.WW.OtOpcUa.Client.UI.Services; namespace ZB.MOM.WW.OtOpcUa.Client.UI.Tests.Fakes; public sealed class FakeSettingsService : ISettingsService { /// Gets or sets the settings held by this fake service. public UserSettings Settings { get; set; } = new(); /// Gets the number of times Load has been called. public int LoadCallCount { get; private set; } /// Gets the number of times Save has been called. public int SaveCallCount { get; private set; } /// Gets the last settings that were saved. public UserSettings? LastSaved { get; private set; } /// Loads and returns the current settings. public UserSettings Load() { LoadCallCount++; return Settings; } /// Saves the specified settings. /// The settings to save. public void Save(UserSettings settings) { SaveCallCount++; LastSaved = settings; } }