예제 #1
0
        public void Can_unsubscribe_from_source()
        {
            var reactive = new Reactive<int>();
            reactive.Subscribe(observer);

            using (reactive.SubscribeTo(source))
            {
                source.OnNext(5);
            }

            source.OnNext(10);

            observedValues.ShouldBe(new[] { 5 });
        }