Exemplo n.º 1
0
        public void Test2804()
        {
            var file        = TestFramework.CreateInputFile(_fileName);
            var dataReader  = TestFramework.CreateDataReader(file);
            var scanContext = TestFramework.CreateScanContext(_project);

            //File begins with VOPs
            IDataBlock        vopBlock;
            IDataBlockBuilder vopBuilder;

            Assert.IsTrue(GetNextDataBlock(file, dataReader, scanContext, out vopBlock, out vopBuilder));
            Assert.IsNotNull(vopBlock);

            Assert.AreEqual(vopBlock.EndOffset, dataReader.Position);
            Assert.AreEqual(file.Length, dataReader.Length);

            //Next valid datablock is a VOL
            IDataBlock        volBlock;
            IDataBlockBuilder volBuilder;

            Assert.IsTrue(GetNextDataBlock(file, dataReader, scanContext, out volBlock, out volBuilder));
            Assert.IsNotNull(volBlock);
            Assert.IsNotNull(volBuilder);

            IResultNode volResult = scanContext.Results;

            Assert.IsNotNull(volResult);

            var expectedVol = volResult.GetLastDescendant();

            Assert.AreEqual("VideoObjectLayer", expectedVol.Name);
        }
 public void TestConstructorNonExistingFile()
 {
     using (new FileDataReader(TestFramework.CreateDataPacket(TestFramework.CreateInputFile("banaan.aap"), 0, 1)))
     {
     }
 }
 public MockDataReader(byte[] data)
     : this(data, TestFramework.CreateInputFile("<MockDataReader>"))
 {
 }
 public void TestConstructorInputFileMismatch()
 {
     using (new FragmentedDataReader(TestFramework.CreateDataPacket(TestFramework.CreateInputFile(DataFileNameCopy), 0, 100), _dataReaderPoolMock))
     {
     }
 }
 public void TestReaderGetResultsDataBlockUnknown()
 {
     IDataPacket data      = TestFramework.CreateDataPacket(TestFramework.CreateInputFile("ja"), 31337, 1);
     IDataBlock  dataBlock = TestFramework.CreateDataBlock(TestFramework.DetectorFactory.Detectors[0], data, false, null);
     IResultNode results   = TestFramework.GetResults(dataBlock);                // TODO: _project??
 }