public void Settings_Service_Called_On_SoberTimeDisplayPreferenceChangedMessage() { _settingsService.Reset(); _settingsService.Setup(s => s.Get(PreferenceConstants.SoberTimeDisplay, It.IsAny <int>())) .Returns(0); ViewModelUnderTest.Receive(new Messages.SoberTimeDisplayPreferenceChangedMessage(SoberTimeDisplayPreference.DaysMonthsYears)); _settingsService.Verify(x => x.Get(PreferenceConstants.SoberTimeDisplay, It.IsAny <int>()), Times.Once); }
public void Settings_Service_Called_On_SoberDateChangedMessage() { _settingsService.Reset(); _settingsService.Setup(s => s.Get(PreferenceConstants.SoberDate, It.IsAny <DateTime>())) .Returns(_soberDate); ViewModelUnderTest.Receive(new Messages.SoberDateChangedMessage(DateTime.Today)); _settingsService.Verify(x => x.Get(PreferenceConstants.SoberDate, It.IsAny <DateTime>()), Times.Once); }