Пример #1
0
            public void Should_parse_a_simple_time_marble_string_to_a_number()
            {
                var scheduler = new MarbleTestScheduler();
                var time      = scheduler.CreateTime("-----|");

                Assert.That(time, Is.EqualTo(50_000));
            }
Пример #2
0
            public void Should_assert_subscriptions_of_a_cold_observable()
            {
                var source       = _scheduler.CreateColdObservable <char>("---a---b-|");
                var subs         = "^--------!";
                var unsub        = "---------|";
                var subscription = source.Subscribe();

                _scheduler.ScheduleAbsolute(subscription, _scheduler.CreateTime(unsub), (_, sub) =>
                {
                    sub.Dispose();
                    return(Disposable.Empty);
                });

                _scheduler.ExpectSubscriptions(source.Subscriptions).ToBe(subs);
            }
Пример #3
0
            public void Should_throw_if_not_given_good_marble_input()
            {
                var scheduler = new MarbleTestScheduler();

                Assert.Throws <Exception>(() => scheduler.CreateTime("-a-b-#"));
            }