コード例 #1
0
        public void Test()
        {
            for (int i = 0; i < _testFiles.Length; i++)
            {
                string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "Amiga Fast File System",
                                               _testFiles[i]);

                IFilter filter = new LZip();
                filter.Open(location);
                IMediaImage image = new ZZZRawImage();
                Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
                Assert.AreEqual(_mediaTypes[i], image.Info.MediaType, _testFiles[i]);
                Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
                Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, _testFiles[i]);
                IFilesystem fs = new AmigaDOSPlugin();

                var wholePart = new Partition
                {
                    Name   = "Whole device",
                    Length = image.Info.Sectors,
                    Size   = image.Info.Sectors * image.Info.SectorSize
                };

                Assert.AreEqual(true, fs.Identify(image, wholePart), _testFiles[i]);
                fs.GetInformation(image, wholePart, out _, null);
                Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testFiles[i]);
                Assert.AreEqual(_clusterSize[i], fs.XmlFsType.ClusterSize, _testFiles[i]);
                Assert.AreEqual("Amiga FFS", fs.XmlFsType.Type, _testFiles[i]);
                Assert.AreEqual(_volumeName[i], fs.XmlFsType.VolumeName, _testFiles[i]);
                Assert.AreEqual(_volumeSerial[i], fs.XmlFsType.VolumeSerial, _testFiles[i]);
            }
        }
コード例 #2
0
        public void Test()
        {
            for (int i = 0; i < testfiles.Length; i++)
            {
                string  location = Path.Combine(Consts.TestFilesRoot, "filesystems", "udf", testfiles[i]);
                IFilter filter   = new LZip();
                filter.Open(location);
                IMediaImage image = new ZZZRawImage();
                Assert.AreEqual(true, image.Open(filter), testfiles[i]);
                Assert.AreEqual(sectors[i], image.Info.Sectors, testfiles[i]);
                Assert.AreEqual(sectorsize[i], image.Info.SectorSize, testfiles[i]);
                IFilesystem fs = new UDF();

                var wholePart = new Partition
                {
                    Name = "Whole device", Length = image.Info.Sectors,
                    Size = image.Info.Sectors * image.Info.SectorSize
                };

                Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]);
                fs.GetInformation(image, wholePart, out _, null);
                Assert.AreEqual(clusters[i], fs.XmlFsType.Clusters, testfiles[i]);
                Assert.AreEqual(clustersize[i], fs.XmlFsType.ClusterSize, testfiles[i]);
                Assert.AreEqual(udfversion[i], fs.XmlFsType.Type, testfiles[i]);
                Assert.AreEqual(volumename[i], fs.XmlFsType.VolumeName, testfiles[i]);
                Assert.AreEqual(volumeserial[i], fs.XmlFsType.VolumeSetIdentifier, testfiles[i]);
                Assert.AreEqual(oemid[i], fs.XmlFsType.SystemIdentifier, testfiles[i]);
            }
        }
コード例 #3
0
        public void Test()
        {
            for (int i = 0; i < testfiles.Length; i++)
            {
                string  location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fat16_human", testfiles[i]);
                IFilter filter   = new LZip();
                filter.Open(location);
                IMediaImage image = new ZZZRawImage();
                Assert.AreEqual(true, image.Open(filter), testfiles[i]);
                Assert.AreEqual(sectors[i], image.Info.Sectors, testfiles[i]);
                Assert.AreEqual(sectorsize[i], image.Info.SectorSize, testfiles[i]);
                List <Partition> partitions = Core.Partitions.GetAll(image);
                IFilesystem      fs         = new FAT();
                int part = -1;
                for (int j = 0; j < partitions.Count; j++)
                {
                    if (partitions[j].Type == "Human68k")
                    {
                        part = j;
                        break;
                    }
                }

                Assert.AreNotEqual(-1, part, $"Partition not found on {testfiles[i]}");
                Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
                fs.GetInformation(image, partitions[part], out _, null);
                Assert.AreEqual(clusters[i], fs.XmlFsType.Clusters, testfiles[i]);
                Assert.AreEqual(clustersize[i], fs.XmlFsType.ClusterSize, testfiles[i]);
                Assert.AreEqual("FAT16", fs.XmlFsType.Type, testfiles[i]);
                Assert.AreEqual(volumename[i], fs.XmlFsType.VolumeName, testfiles[i]);
                Assert.AreEqual(volumeserial[i], fs.XmlFsType.VolumeSerial, testfiles[i]);
                Assert.AreEqual(oemid[i], fs.XmlFsType.SystemIdentifier, testfiles[i]);
            }
        }
コード例 #4
0
ファイル: ISO9660.cs プロジェクト: KailoKyra/DiscImageChef
        public void Test()
        {
            for (int i = 0; i < testfiles.Length; i++)
            {
                string  location = Path.Combine(Consts.TestFilesRoot, "filesystems", "iso9660", testfiles[i]);
                IFilter filter   = new LZip();
                filter.Open(location);
                IMediaImage image = new ZZZRawImage();
                Assert.AreEqual(true, image.Open(filter), $"{testfiles[i]}: Open()");
                Assert.AreEqual(mediatypes[i], image.Info.MediaType, $"{testfiles[i]}: MediaType");
                Assert.AreEqual(sectors[i], image.Info.Sectors, $"{testfiles[i]}: Sectors");
                Assert.AreEqual(sectorsize[i], image.Info.SectorSize, $"{testfiles[i]}: SectorSize");
                IFilesystem fs = new ISO9660();

                var wholePart = new Partition
                {
                    Name = "Whole device", Length = image.Info.Sectors,
                    Size = image.Info.Sectors * image.Info.SectorSize
                };

                Assert.AreEqual(true, fs.Identify(image, wholePart), $"{testfiles[i]}: Identify()");
                fs.GetInformation(image, wholePart, out _, null);
                Assert.AreEqual(clusters[i], fs.XmlFsType.Clusters, $"{testfiles[i]}: Clusters");
                Assert.AreEqual(clustersize[i], fs.XmlFsType.ClusterSize, $"{testfiles[i]}: ClusterSize");
                Assert.AreEqual("ISO9660", fs.XmlFsType.Type, $"{testfiles[i]}: Type");
                Assert.AreEqual(volumename[i], fs.XmlFsType.VolumeName, $"{testfiles[i]}: VolumeName");
                Assert.AreEqual(volumeserial[i], fs.XmlFsType.VolumeSerial, $"{testfiles[i]}: VolumeSerial");
                Assert.AreEqual(sysid[i], fs.XmlFsType.SystemIdentifier, $"{testfiles[i]}: SystemIdentifier");
                Assert.AreEqual(appid[i], fs.XmlFsType.ApplicationIdentifier, $"{testfiles[i]}: ApplicationIdentifier");
            }
        }
コード例 #5
0
 public void Test()
 {
     for (int i = 0; i < testfiles.Length; i++)
     {
         string  location = Path.Combine(Consts.TestFilesRoot, "devices", "ls120", testfiles[i]);
         IFilter filter   = new LZip();
         filter.Open(location);
         IMediaImage image = new ZZZRawImage();
         Assert.AreEqual(true, image.Open(filter), testfiles[i]);
         Assert.AreEqual(mediatypes[i], image.Info.MediaType, testfiles[i]);
         Assert.AreEqual(sectors[i], image.Info.Sectors, testfiles[i]);
         Assert.AreEqual(sectorsize[i], image.Info.SectorSize, testfiles[i]);
     }
 }
コード例 #6
0
ファイル: IomegaJaz.cs プロジェクト: morefun0302/Aaru
 public void Test()
 {
     for (int i = 0; i < _testFiles.Length; i++)
     {
         string  location = Path.Combine(Consts.TEST_FILES_ROOT, "Device test dumps", "JAZ", _testFiles[i]);
         IFilter filter   = new LZip();
         filter.Open(location);
         IMediaImage image = new ZZZRawImage();
         Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
         Assert.AreEqual(_mediaTypes[i], image.Info.MediaType, _testFiles[i]);
         Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
         Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, _testFiles[i]);
     }
 }
コード例 #7
0
ファイル: FATX.cs プロジェクト: KailoKyra/DiscImageChef
        public void Init()
        {
            location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fatx16", "be", "microsoft256mb.img.lz");
            filter   = new LZip();
            filter.Open(location);
            image = new ZZZRawImage();
            Assert.AreEqual(true, image.Open(filter));
            fs = new XboxFatPlugin();
            List <Partition> partitions = Core.Partitions.GetAll(image);

            Assert.AreEqual(2, partitions.Count);
            dataPartition = partitions[1];
            Errno error = fs.Mount(image, dataPartition, null, null, null);

            Assert.AreEqual(Errno.NoError, error);
        }
コード例 #8
0
        public void Init()
        {
            _location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "Xbox FAT16", "be",
                                     "microsoft256mb.img.lz");

            _filter = new LZip();
            _filter.Open(_location);
            _image = new ZZZRawImage();
            Assert.AreEqual(true, _image.Open(_filter));
            _fs = new XboxFatPlugin();
            List <Partition> partitions = Core.Partitions.GetAll(_image);

            Assert.AreEqual(2, partitions.Count);
            _dataPartition = partitions[1];
            Errno error = _fs.Mount(_image, _dataPartition, null, null, null);

            Assert.AreEqual(Errno.NoError, error);
        }
コード例 #9
0
ファイル: FATX.cs プロジェクト: KailoKyra/DiscImageChef
        public void Init()
        {
            location = Path.Combine(Consts.TestFilesRoot, "filesystems", "fatx16", "le", "fatx.img.lz");
            filter   = new LZip();
            filter.Open(location);
            image = new ZZZRawImage();
            Assert.AreEqual(true, image.Open(filter));
            fs = new XboxFatPlugin();

            wholePart = new Partition
            {
                Name = "Whole device", Length = image.Info.Sectors, Size = image.Info.Sectors * image.Info.SectorSize
            };

            Errno error = fs.Mount(image, wholePart, null, null, null);

            Assert.AreEqual(Errno.NoError, error);
        }
コード例 #10
0
        public void Init()
        {
            _location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "Xbox FAT16", "le", "fatx.img.lz");
            _filter   = new LZip();
            _filter.Open(_location);
            _image = new ZZZRawImage();
            Assert.AreEqual(true, _image.Open(_filter));
            _fs = new XboxFatPlugin();

            _wholePart = new Partition
            {
                Name   = "Whole device",
                Length = _image.Info.Sectors,
                Size   = _image.Info.Sectors * _image.Info.SectorSize
            };

            Errno error = _fs.Mount(_image, _wholePart, null, null, null);

            Assert.AreEqual(Errno.NoError, error);
        }
コード例 #11
0
        public void Test()
        {
            for (int i = 0; i < _testFiles.Length; i++)
            {
                string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "UNIX filesystem (NeXT)",
                                               _testFiles[i]);

                IFilter filter = new LZip();
                filter.Open(location);
                IMediaImage image = new ZZZRawImage();
                Assert.AreEqual(true, image.Open(filter), _testFiles[i]);
                Assert.AreEqual(_sectors[i], image.Info.Sectors, _testFiles[i]);
                Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, _testFiles[i]);
                List <Partition> partitions = Core.Partitions.GetAll(image);
                IFilesystem      fs         = new FFSPlugin();
                int part = -1;

                for (int j = 0; j < partitions.Count; j++)
                {
                    if (partitions[j].Type == "4.3BSD" ||
                        partitions[j].Type == "4.4BSD")
                    {
                        part = j;

                        break;
                    }
                }

                Assert.AreNotEqual(-1, part, $"Partition not found on {_testFiles[i]}");
                Assert.AreEqual(true, fs.Identify(image, partitions[part]), _testFiles[i]);
                fs.GetInformation(image, partitions[part], out _, null);
                Assert.AreEqual(_clusters[i], fs.XmlFsType.Clusters, _testFiles[i]);
                Assert.AreEqual(_clusterSize[i], fs.XmlFsType.ClusterSize, _testFiles[i]);
                Assert.AreEqual(_type[i], fs.XmlFsType.Type, _testFiles[i]);
                Assert.AreEqual(_volumeName[i], fs.XmlFsType.VolumeName, _testFiles[i]);
                Assert.AreEqual(_volumeSerial[i], fs.XmlFsType.VolumeSerial, _testFiles[i]);
            }
        }
コード例 #12
0
 public void Test()
 {
     for (int i = 0; i < testfiles.Length; i++)
     {
         string  location = Path.Combine(Consts.TestFilesRoot, "partitions", "xbox", testfiles[i]);
         IFilter filter   = new LZip();
         filter.Open(location);
         IMediaImage image = new ZZZRawImage();
         Assert.AreEqual(true, image.Open(filter), testfiles[i]);
         List <Partition> partitions = Core.Partitions.GetAll(image);
         Assert.AreEqual(wanted[i].Length, partitions.Count, testfiles[i]);
         for (int j = 0; j < partitions.Count; j++)
         {
             // Too chatty
             Assert.AreEqual(wanted[i][j].Description, partitions[j].Description, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Length * 512, partitions[j].Size, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Start * 512, partitions[j].Offset, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Length, partitions[j].Length, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Sequence, partitions[j].Sequence, testfiles[i]);
             Assert.AreEqual(wanted[i][j].Start, partitions[j].Start, testfiles[i]);
         }
     }
 }