Akka.Tests.Actor.Scheduler.DedicatedThreadScheduler_ActionScheduler_Cancellation_Tests.When_ScheduleOnce_and_then_canceling_before_they_occur_Then_their_actions_should_not_be_invoked C# (CSharp) Метод

When_ScheduleOnce_and_then_canceling_before_they_occur_Then_their_actions_should_not_be_invoked() приватный Метод

        public void When_ScheduleOnce_and_then_canceling_before_they_occur_Then_their_actions_should_not_be_invoked()
        {
            // Prepare, set up actions to be fired
            IActionScheduler scheduler = new DedicatedThreadScheduler(Sys);

            var cancelable = new Cancelable(scheduler);
            scheduler.ScheduleOnce(100, () => TestActor.Tell("Test"), cancelable);
            cancelable.Cancel();

            //Validate that no messages were sent
            ExpectNoMsg(150);
        }