diff --git a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Tests/ModbusBackgroundLoopTokenLifetimeTests.cs b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Tests/ModbusBackgroundLoopTokenLifetimeTests.cs index 91cee0010..7a4e2478a 100644 --- a/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Tests/ModbusBackgroundLoopTokenLifetimeTests.cs +++ b/tests/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Modbus.Tests/ModbusBackgroundLoopTokenLifetimeTests.cs @@ -138,7 +138,7 @@ public sealed class ModbusBackgroundLoopTokenLifetimeTests gate.ArmedSchedules.ShouldBe(1, "exactly one task (the background loop) must be scheduled by initialize; anything else is ambiguous"); var probeTask = Field(drv, taskField); - probeTask.ShouldNotBeNull(); + Assert.NotNull(probeTask); // not Shouldly: its Task overload would be an un-awaited async assertion await gate.Started.Task.WaitAsync(Bound, TestContext.Current.CancellationToken); probeTask.IsCompleted.ShouldBeFalse("the worker must be parked after its start check, before its delegate runs");