public TutorialTimeSummaryViewModel( int timeSpent, int averageTimeSpent, bool showTimeSetting, bool showLearnStatusSetting ) { TimeSpentSummary = DurationFormattingHelper.FormatDuration(timeSpent); AverageTimeSummary = DurationFormattingHelper.FormatDuration(averageTimeSpent); ShowTime = showTimeSetting && showLearnStatusSetting; }
public void FormatDuration_should_have_duration_for_0_minutes() { // Given const int duration = 0; // When var result = DurationFormattingHelper.FormatDuration(duration); // Then result.Should().Be("0 minutes"); }
public void FormatDuration_should_have_duration_for_one_hour_one_minute() { // Given const int duration = 61; // When var result = DurationFormattingHelper.FormatDuration(duration); // Then result.Should().Be("1 hour 1 minute"); }
public void FormatDuration_should_have_duration_for_multiple_hours() { // Given const int duration = 195; // When var result = DurationFormattingHelper.FormatDuration(duration); // Then result.Should().Be("3 hours 15 minutes"); }
public void FormatDuration_should_have_duration_for_whole_number_of_hours() { // Given const int duration = 120; // When var result = DurationFormattingHelper.FormatDuration(duration); // Then result.Should().Be("2 hours"); }