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); }
public void eac3tobatchfilewritewarningwervice_has_warning_when_summary_and_title_selected_but_no_disc_selected_test() { //given a list of discs where summary and titles selected but disc not selected List <BluRayDiscInfo> discs = new List <BluRayDiscInfo>() { new BluRayDiscInfo() { IsSelected = true, BluRayPath = "c:\\temp\\disc1" }, new BluRayDiscInfo() { IsSelected = false, BluRayPath = "c:\\temp\\disc2" } }; discs[0].BluRaySummaryInfoList = new List <BluRaySummaryInfo>() { new BluRaySummaryInfo() { IsSelected = true, Eac3ToId = "1)" }, new BluRaySummaryInfo() { IsSelected = true, Eac3ToId = "2)" } }; discs[1].BluRaySummaryInfoList = new List <BluRaySummaryInfo>() { new BluRaySummaryInfo() { IsSelected = true, BluRayTitleInfo = new BluRayTitleInfo() { Video = new BluRayTitleVideo() { IsSelected = true } } }, new BluRaySummaryInfo() { IsSelected = true, BluRayTitleInfo = new BluRayTitleInfo() { AudioList = new List <BluRayTitleAudio>() { new BluRayTitleAudio() { IsSelected = true } } } } }; //when i get warnings IEAC3ToBatchFileWriteWarningService service = new EAC3ToBatchFileWriteWarningService(discs); WarningCollection warnings = service.GetWarnings(); //then warnings should tell me i have selected summary and titles found with no disc selected warnings.Where(w => w.Description.Contains("Disc disc2 is not selected but has selected summary and video")).Count().Should().Be(1); }
private void MKVMergeWarnings(WarningCollection warnings) { if (_batchGuyEAC3ToSettings.EAC3ToSettings.EAC3ToOutputPath == _batchGuyEAC3ToSettings.EAC3ToSettings.MKVMergeOutputPath) { warnings.Add(new Warning() { Id = 0, Description = "The eac3to output path is the same as mkvmerge output path and could have output file name conflicts!" }); } }
public WarningIterator ReportIterator() { WarningCollection reportCollection = new WarningCollection(); Report[] reports = db.GetReports(); for (int i = 0; i < reports.Length; i++) { reportCollection[i] = new Warning(reports[i]); } WarningIterator reportIterator = reportCollection.CreateIterator() as WarningIterator; return(reportIterator); }
public WarningIterator AlertIterator() { WarningCollection alertCollection = new WarningCollection(); Alert[] alerts = db.GetAlerts(); for (int i = 0; i < alerts.Length; i++) { alertCollection[i] = new Warning(alerts[i]); } WarningIterator alertIterator = alertCollection.CreateIterator() as WarningIterator; return(alertIterator); }
public void eac3tobatchfilewritewarningwervice_has_no_warnings_when_no_data_anomalies_test() { //given a list of discs where there is no data anomalis 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)" } }; discs[1].BluRaySummaryInfoList = new List <BluRaySummaryInfo>() { new BluRaySummaryInfo() { IsSelected = true }, new BluRaySummaryInfo() { IsSelected = true, Eac3ToId = "2)" } }; //when i get warnings IEAC3ToBatchFileWriteWarningService service = new EAC3ToBatchFileWriteWarningService(discs); WarningCollection warnings = service.GetWarnings(); //then there should be no warnings warnings.Count().Should().Be(0); }
public EAC3ToBatchFileWriteWarningService(List <BluRayDiscInfo> discs) { _discs = discs; _warnings = new WarningCollection(); }
public EAC3ToBatchFileWriteWarningService(List<BluRayDiscInfo> discs) { _discs = discs; _warnings = new WarningCollection(); }