public void EmitsTrueWhenTurnedOn() { var observer = Substitute.For <IObserver <bool> >(); SettingsStorage.CalendarNotificationsEnabled.Subscribe(observer); SettingsStorage.SetCalendarNotificationsEnabled(true); Received.InOrder(() => { observer.OnNext(false); observer.OnNext(true); }); }
public void DoesNotEmitAnyAdditionalFalseValues() { var observer = Substitute.For <IObserver <bool> >(); SettingsStorage.CalendarNotificationsEnabled.Subscribe(observer); SettingsStorage.SetCalendarNotificationsEnabled(false); SettingsStorage.SetCalendarNotificationsEnabled(false); SettingsStorage.SetCalendarNotificationsEnabled(false); Received.InOrder(() => { observer.OnNext(false); }); }