public void Start_ScanTestData_DicomDirFileFound() { var dicomdirFileFound = false; var complete = false; var scanner = new DicomFileScanner(); scanner.FileFound += (fileScanner, file, name) => { if (name.EndsWith("DICOMDIR")) { dicomdirFileFound = true; complete = true; } }; scanner.Complete += fileScanner => complete = true; scanner.Start(@"."); while (!complete) { Thread.Sleep(100); } scanner.Stop(); Assert.True(dicomdirFileFound); }
public void Start_ScanTestData_DicomDirFileFound() { var dicomdirFileFound = false; var complete = false; var scanner = new DicomFileScanner(); scanner.FileFound += (fileScanner, file, name) => { if (name.EndsWith("DICOMDIR")) dicomdirFileFound = true; complete = true; }; scanner.Complete += fileScanner => complete = true; scanner.Start(@"."); while (!complete) Thread.Sleep(100); scanner.Stop(); Assert.True(dicomdirFileFound); }