public ReminderSettingsViewModel(ISaveReminderSettingsCommand saveReminderSettingsCommand, ISettingsManager settingsManager)
        {
            if (saveReminderSettingsCommand == null)
            {
                throw new ArgumentNullException("saveReminderSettingsCommand");
            }
            if (settingsManager == null)
            {
                throw new ArgumentNullException("settingsManager");
            }
            SaveReminderSettingsCommand = new CommandWithLogging(saveReminderSettingsCommand);
            SetupSavedReminderSettingsCommand();
            var currentSettings = settingsManager.FetchCurrentSettings();

            SetReminders(currentSettings);
            SetValuesFromSetting();
        }
Ejemplo n.º 2
0
 private ReminderSettingsViewModel CreateViewModel(ISaveReminderSettingsCommand saveReminderSettingsCommand = null, ISettingsManager settingsManager = null)
 {
     saveReminderSettingsCommand = saveReminderSettingsCommand ?? Substitute.For <ISaveReminderSettingsCommand>();
     settingsManager             = settingsManager ?? Substitute.For <ISettingsManager>();
     return(new ReminderSettingsViewModel(saveReminderSettingsCommand, settingsManager));
 }