Example #1
0
        public IList <DataBlockVerification> VerifyScanOfFragmented(string fileName)
        {
            if (String.IsNullOrEmpty(_fileNameProject))
            {
                Assert.Fail("Incorrect Test Setup:WithProjectFile has not been called.");
            }
            if (!File.Exists(fileName))
            {
                Assert.Fail("Incorrect Test Setup:No file exists at " + Path.GetFullPath(fileName));
            }
            if (_videoDetector == null)
            {
                Assert.Fail("Incorrect Test Setup:WithDetector has not been called.");
            }
            File.Delete(_fileNameProject);
            // Scan test file
            IInputFile scannedFile = ScanFile(fileName);
            var        blocks      = _project.GetDataBlocks(scannedFile);
            var        verifyers   = new List <IDataBlock>(blocks).ConvertAll(block =>
            {
                var result = TestFramework.GetResults(block);
                var descr  = TestFramework.GetDescriptionText(result);
                return(new DataBlockVerification(block, result, "fragment " + block.FragmentIndex + " detected using " + (_systemDetector == null ? "" : _systemDetector.Name + " and ") + _videoDetector.Name + ", containing Results:" + descr));
            });

            return(verifyers);
        }
        public CodecStreamVerification VerifyCodecStream(int index)
        {
            var stream = _dataBlock.CodecStreams[index];
            var result = TestFramework.GetResults(stream);

            return(new CodecStreamVerification(stream, result, "Stream " + stream.StreamNumber + "(" + stream.Name + ") from " + _description + ", with Results:" + Environment.NewLine + TestFramework.GetDescriptionText(result)));
        }
Example #3
0
 private static String Describe(IFragment dataBlock)
 {
     return(TestFramework.GetDescriptionText(TestFramework.GetResults(dataBlock)));
 }