public void Test() { for (int i = 0; i < _testFiles.Length; i++) { string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "Amiga Old 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 OFS", fs.XmlFsType.Type, _testFiles[i]); Assert.AreEqual(_volumeName[i], fs.XmlFsType.VolumeName, _testFiles[i]); Assert.AreEqual(_volumeSerial[i], fs.XmlFsType.VolumeSerial, _testFiles[i]); } }
public void Test() { for (int i = 0; i < testfiles.Length; i++) { string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "dtfs", 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 SysVfs(); Partition 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(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]); } }
public void Info() { Environment.CurrentDirectory = _dataFolder; Assert.Multiple(() => { for (int i = 0; i < _testFiles.Length; i++) { var filter = new LZip(); filter.Open(_testFiles[i]); var image = new ZZZRawImage(); bool opened = image.Open(filter); Assert.AreEqual(true, opened, $"Open: {_testFiles[i]}"); if (!opened) { continue; } using (new AssertionScope()) { Assert.Multiple(() => { Assert.AreEqual(_sectors[i], image.Info.Sectors, $"Sectors: {_testFiles[i]}"); Assert.AreEqual(_sectorSize[i], image.Info.SectorSize, $"Sector size: {_testFiles[i]}"); Assert.AreEqual(_mediaTypes[i], image.Info.MediaType, $"Media type: {_testFiles[i]}"); }); } } }); }
public void Test() { for (int i = 0; i < testfiles.Length; i++) { string location = Path.Combine(Consts.TestFilesRoot, "filesystems", "hfs_cdrom", 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 AppleHFS(); int part = -1; for (int j = 0; j < partitions.Count; j++) { if (partitions[j].Type == "Apple_HFS") { 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("HFS", fs.XmlFsType.Type, testfiles[i]); Assert.AreEqual(volumename[i], fs.XmlFsType.VolumeName, testfiles[i]); Assert.AreEqual(volumeserial[i], fs.XmlFsType.VolumeSerial, testfiles[i]); } }
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(); Partition 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"); } }
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]); } }
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]); } }
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); }
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); }
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); }
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); }
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]); } }
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]); } } }