Ejemplo n.º 1
0
            public void CompletesWhenCreatedFromAction()
            {
                var testScheduler = new TestScheduler();

                void actionFunction(int n)
                {
                    return;
                }

                var action = InputAction <int> .FromAction(actionFunction, testScheduler);

                var observer = testScheduler.CreateObserver <Unit>();

                action.ExecuteWithCompletion(2).Subscribe(observer);

                testScheduler.Start();
                observer.Messages.Count.Should().Be(2);
                observer.Messages.Last().Value.Kind.Should().Be(NotificationKind.OnCompleted);
            }
Ejemplo n.º 2
0
 public InputAction <TInput> FromAction <TInput>(Action <TInput> action)
 {
     return(InputAction <TInput> .FromAction(action, schedulerProvider.MainScheduler));
 }