Наследование: IBluRayTitleInfoDefaultSettingsService
 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();
 }
 public void bluraytitleinfodefaultsettingsservice_can_mark_all_subtitles_as_selected_as_default_Test()
 {
     //given
     ApplicationSettings applicationSettings = new ApplicationSettings() { BluRayTitleInfoDefaultSettings = new BluRayTitleInfoDefaultSettings() { SelectAllSubtitles = true } };
     BluRaySummaryInfo bluraySummaryInfo = new BluRaySummaryInfo() { BluRayTitleInfo = new BluRayTitleInfo()
     { Subtitles = new List<BluRayTitleSubtitle>() { new BluRayTitleSubtitle() { IsSelected = false },
     new BluRayTitleSubtitle() { IsSelected = false } } } };
     IAudioService audioService = new AudioService();
     IBluRayTitleInfoDefaultSettingsService service = new BluRayTitleInfoDefaultSettingsService(applicationSettings, bluraySummaryInfo, audioService);
     //when
     service.SetSubtitleDefaultSettings();
     //then
     bluraySummaryInfo.BluRayTitleInfo.Subtitles.Where(s => s.IsSelected == true).Count().Should().Be(2);
 }
Пример #3
0
        private void SetBluRayTitleInfoDefaultSettings()
        {
            IBluRayTitleInfoDefaultSettingsService service = new BluRayTitleInfoDefaultSettingsService(Program.ApplicationSettings,
                _bluRaySummaryInfo, _audioService);

            service.SetSubtitleDefaultSettings();
            service.SetChaptersDefaultSettings();
            service.SetAudioDefaultSettings();
        }