public MainPageViewModel(ITimeSavingsCalculator timeSavingsCalculator) { Debug.WriteLine($"**** {this.GetType().Name}.{nameof(MainPageViewModel)}: ctor"); _timeSavingsCalculator = timeSavingsCalculator; FrequencyUnitsOfTime = new ObservableCollection <string> { "per day", "per week", "per month", "per year" }; UnitsOfTime = new ObservableCollection <string> { "days", "weeks", "months", "years" }; SelectedFrequencyTimeUnit = "per month"; SelectedTaskLifetimeTimeUnit = "weeks"; Title = "EfficienSee"; TimeSavedLabelText = "By how many minutes could you shorten your task, given some effort to make some part of it automated, or more efficient?"; TaskFrequencyLabelText = "How frequently do you it?"; TaskLifetimeLabelText = "How long will you keep performing this task?"; MaxTimeToAllotLabelText = "You can spend this much time before spending more time than you will save:"; }
public void TestInit() { timeSavingsCalculatorSub = Substitute.For <ITimeSavingsCalculator>(); mainPageViewModel = new MainPageViewModel(timeSavingsCalculatorSub); }