36 lines
1.1 KiB
C#
36 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();
|
|
}
|
|
}
|