BatchGuy.App.Eac3To.Services.EAC3ToBatchFileWriteWarningService.GetWarnings C# (CSharp) Метод

GetWarnings() публичный Метод

public GetWarnings ( ) : WarningCollection
Результат WarningCollection
        public WarningCollection GetWarnings()
        {
            this.DiscSelectedWithNoSummarySelected();
            this.SummaryAndTitleSelectedWithNoDiscSelected();
            this.TitleSelectedWithNoDiscAndSummarySelected();

            return _warnings;
        }

Usage Example

 public void eac3tobatchfilewritewarningwervice_has_warning_when_disc_selected_but_no_summaries_selected_test()
 {
     //given a list of discs where a disc is selected but no summaries selected
     List<BluRayDiscInfo> discs = new List<BluRayDiscInfo>() { new BluRayDiscInfo() { IsSelected = true, BluRayPath = "c:\\temp\\disc1" }, new BluRayDiscInfo() { IsSelected = true, BluRayPath = "c:\\temp\\disc2" } };
     discs[0].BluRaySummaryInfoList = new List<BluRaySummaryInfo>() { new BluRaySummaryInfo() { IsSelected = true }, new BluRaySummaryInfo() { IsSelected = true, Eac3ToId = "1)" } };
     //when i get warnings
     IEAC3ToBatchFileWriteWarningService service = new EAC3ToBatchFileWriteWarningService(discs);
     WarningCollection warnings = service.GetWarnings();
     //then warnings should tell me i have selected discs found with no summary selected
     warnings.Where(w => w.Description.Contains("disc2 selected but no summary selected")).Count().Should().Be(1);
 }
All Usage Examples Of BatchGuy.App.Eac3To.Services.EAC3ToBatchFileWriteWarningService::GetWarnings