public void Subscribe_should_pass_initial_value_to_observer_immediately() { observable = new CachingObservable <string>("initial"); observable.Subscribe(observer1); observer1.ReceivedCalls().Should().HaveCount(1); observer1.Received().OnNext("initial"); }
public void Subscribe_should_do_nothing_when_nothing_has_been_observed_yet() { observable.Subscribe(observer1); observer1.ReceivedCalls().Should().BeEmpty(); }
public IDisposable Subscribe(IObserver <T> observer) { updateAction.Start(); return(baseObservable.Subscribe(observer)); }