public void WhenClearActions_ShouldExecuteNothing() { var testee = new ApplicationDispatcher(); var actionTester = new ActionTester(); testee.AddDelayedAction(5, actionTester.TestAction); testee.AddActionAfterPolls(1, actionTester.TestAction); testee.CancellAll(); Thread.Sleep(25); testee.ExecuteInvokes(); actionTester.WasCalled.Should().BeFalse(); }