Esempio n. 1
0
        public async Task should_be_invoke_chain_workers()
        {
            var result = await Chain.RunAsync();

            DispatcherToken.WaitCompleted();

            MockActionInvoker.Verify(p => p.Invoke(It.IsAny <CancellationToken>()), Times.Exactly(2));
        }
        public void Initalize()
        {
            MockActionInvoker.Reset();
            MockWorkerHandler.Reset();

            DispatcherToken = Factory.Start(new ActionDispatcherSettings
            {
                Timeout = TimeSpan.FromSeconds(0.1)
            });

            DispatcherToken.Post(t => Task.Delay(10000, t));
        }
Esempio n. 3
0
        public void should_be_invoke_chain_workers()
        {
            DispatcherToken.WaitCompleted();

            MockActionInvoker.Verify(p => p.Invoke(It.IsAny <CancellationToken>()), Times.Exactly(8));
        }
        public void should_be_two_worker_from_all_success()
        {
            DispatcherToken.WaitCompleted();

            MockActionInvoker.Verify(p => p.Invoke(It.IsAny <CancellationToken>()), Times.Exactly(2));
        }
        public void should_be_two_action_execute()
        {
            DispatcherToken.WaitCompleted();

            MockActionInvoker.Verify(p => p.Invoke(It.IsAny <CancellationToken>()), Times.Exactly(2));
        }