WorkerTests¶
Namespace: UnitTests.MqttReceiver
Unit tests for the Worker class, verifying background service orchestration functionality.
Inheritance Object → WorkerTests
Constructors¶
WorkerTests()¶
Methods¶
Constructor_WithNullLogger_ThrowsArgumentNullException()¶
Tests that the Worker constructor throws when logger is null.
Constructor_WithNullReceiver_ThrowsArgumentNullException()¶
Tests that the Worker constructor throws when receiver is null.
Constructor_WithValidDependencies_InitializesSuccessfully()¶
Tests that the Worker constructor properly initializes with valid dependencies.
Dispose_DisposesWithoutException()¶
Tests that the worker disposes properly.
Dispose_MultipleCalls_DoesNotThrow()¶
Tests that the worker can be disposed multiple times without exception.
ExecuteAsync_WithCancellationToken_CompletesGracefully()¶
Tests that ExecuteAsync handles cancellation token properly.
Returns¶
Setup()¶
Sets up test fixtures and initializes mocks before each test execution.
TearDown()¶
Cleans up resources after each test execution.