Linter/formatter pass across the full codebase. Restores required partial keyword on AXAML code-behind classes that the formatter incorrectly removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using System.Diagnostics;
|
|
using Shouldly;
|
|
using Xunit;
|
|
using ZB.MOM.WW.LmxOpcUa.Host;
|
|
using ZB.MOM.WW.LmxOpcUa.Host.Configuration;
|
|
using ZB.MOM.WW.LmxOpcUa.Tests.Helpers;
|
|
|
|
namespace ZB.MOM.WW.LmxOpcUa.Tests.Wiring
|
|
{
|
|
/// <summary>
|
|
/// Verifies: Start then Stop completes within 30 seconds. (SVC-004)
|
|
/// </summary>
|
|
public class ShutdownCompletesTest
|
|
{
|
|
/// <summary>
|
|
/// Confirms that a started service can shut down within the required time budget.
|
|
/// </summary>
|
|
[Fact]
|
|
public void Shutdown_CompletesWithin30Seconds()
|
|
{
|
|
var config = new AppConfiguration
|
|
{
|
|
OpcUa = new OpcUaConfiguration { Port = 14841, GalaxyName = "TestGalaxy" },
|
|
MxAccess = new MxAccessConfiguration { ClientName = "Test" },
|
|
Dashboard = new DashboardConfiguration { Enabled = false }
|
|
};
|
|
|
|
var proxy = new FakeMxProxy();
|
|
var repo = new FakeGalaxyRepository();
|
|
var service = new OpcUaService(config, proxy, repo);
|
|
|
|
service.Start();
|
|
|
|
var sw = Stopwatch.StartNew();
|
|
service.Stop();
|
|
sw.Stop();
|
|
|
|
sw.Elapsed.TotalSeconds.ShouldBeLessThan(30);
|
|
}
|
|
}
|
|
} |