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