public void Error_should_complete_all_current_observers() { observable.Subscribe(observer1); observable.Subscribe(observer2); observable.Error(error1); observer1.Received().OnError(error1); observer2.Received().OnError(error1); }
private void ChangeStateTo(VostokApplicationState newState, Exception error = null) { ApplicationState = newState; onApplicationStateChanged.Next(newState); if (error != null) { onApplicationStateChanged.Error(error); } else if (newState.IsTerminal()) { onApplicationStateChanged.Complete(); } }