BatchGuy.App.Settings.Services.BluRayTitleInfoDefaultSettingsService.SetChaptersDefaultSettings C# (CSharp) Method

SetChaptersDefaultSettings() public method

public SetChaptersDefaultSettings ( ) : void
return void
        public void SetChaptersDefaultSettings()
        {
            if (_bluRaySummaryInfo.BluRayTitleInfo.Chapter != null)
            {
                _bluRaySummaryInfo.BluRayTitleInfo.Chapter.IsSelected = _applicationSettings.BluRayTitleInfoDefaultSettings.SelectChapters;
            }
        }

Usage Example

 public void bluraytitleinfodefaultsettingsservice_can_mark_all_chapter_as_selected_as_default_Test()
 {
     //given
     ApplicationSettings applicationSettings = new ApplicationSettings() { BluRayTitleInfoDefaultSettings = new BluRayTitleInfoDefaultSettings() { SelectChapters = true} };
     BluRaySummaryInfo bluraySummaryInfo = new BluRaySummaryInfo() { BluRayTitleInfo = new BluRayTitleInfo() { Chapter = new BluRayTitleChapter() { IsSelected = false } } };
     BluRayTitleInfoDefaultSettings defaultSettings = new BluRayTitleInfoDefaultSettings() {  SelectChapters = true };
     IAudioService audioService = new AudioService();
     IBluRayTitleInfoDefaultSettingsService service = new BluRayTitleInfoDefaultSettingsService(applicationSettings, bluraySummaryInfo, audioService);
     //when
     service.SetChaptersDefaultSettings();
     //then
     bluraySummaryInfo.BluRayTitleInfo.Chapter.IsSelected.Should().BeTrue();
 }
All Usage Examples Of BatchGuy.App.Settings.Services.BluRayTitleInfoDefaultSettingsService::SetChaptersDefaultSettings