Files
CBDDC/tests/ZB.MOM.WW.CBDDC.Hosting.Tests/NoOpServicesTests.cs
Joseph Doherty 7ebc2cb567
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
Reformat/cleanup
2026-02-21 07:53:53 -05:00

35 lines
1.1 KiB
C#

using ZB.MOM.WW.CBDDC.Hosting.Services;
namespace ZB.MOM.WW.CBDDC.Hosting.Tests;
public class NoOpServicesTests
{
/// <summary>
/// Verifies that no-op discovery service lifecycle calls complete and no peers are returned.
/// </summary>
[Fact]
public async Task NoOpDiscoveryService_ReturnsNoPeers_AndCompletesLifecycleCalls()
{
var service = new NoOpDiscoveryService();
service.GetActivePeers().ShouldBeEmpty();
(await Record.ExceptionAsync(() => service.Start())).ShouldBeNull();
(await Record.ExceptionAsync(() => service.Stop())).ShouldBeNull();
service.Dispose();
}
/// <summary>
/// Verifies that no-op sync orchestrator lifecycle calls complete without exceptions.
/// </summary>
[Fact]
public async Task NoOpSyncOrchestrator_CompletesLifecycleCalls()
{
var orchestrator = new NoOpSyncOrchestrator();
(await Record.ExceptionAsync(() => orchestrator.Start())).ShouldBeNull();
(await Record.ExceptionAsync(() => orchestrator.Stop())).ShouldBeNull();
orchestrator.Dispose();
}
}