Initial import of the CBDDC codebase with docs and tests. Add a .NET-focused gitignore to keep generated artifacts out of source control.
Some checks failed
CI / verify (push) Has been cancelled
Some checks failed
CI / verify (push) Has been cancelled
This commit is contained in:
35
tests/ZB.MOM.WW.CBDDC.Hosting.Tests/NoOpServicesTests.cs
Normal file
35
tests/ZB.MOM.WW.CBDDC.Hosting.Tests/NoOpServicesTests.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user