Naming fixes.

This commit is contained in:
2020-07-20 21:11:32 +01:00
parent c58c0fd1f8
commit 6220425ac6
525 changed files with 15675 additions and 15524 deletions

View File

@@ -40,49 +40,49 @@ namespace Aaru.Tests.Filesystems
[TestFixture]
public class Htfs
{
readonly string[] testfiles =
readonly string[] _testfiles =
{
"scoopenserver_5.0.7hw_dmf.img.lz", "scoopenserver_5.0.7hw_dshd.img.lz",
"scoopenserver_5.0.7hw_mf2dd.img.lz", "scoopenserver_5.0.7hw_mf2ed.img.lz",
"scoopenserver_5.0.7hw_mf2hd.img.lz"
};
readonly MediaType[] mediatypes =
readonly MediaType[] _mediatypes =
{
MediaType.DMF, MediaType.DOS_525_HD, MediaType.DOS_35_DS_DD_9, MediaType.DOS_35_ED, MediaType.DOS_35_HD
};
readonly ulong[] sectors =
readonly ulong[] _sectors =
{
3360, 2400, 1440, 5760, 2880
};
readonly uint[] sectorsize =
readonly uint[] _sectorsize =
{
512, 512, 512, 512, 512
};
readonly long[] clusters =
readonly long[] _clusters =
{
1680, 1200, 720, 2880, 1440
};
readonly int[] clustersize =
readonly int[] _clustersize =
{
1024, 1024, 1024, 1024, 1024
};
readonly string[] volumename =
readonly string[] _volumename =
{
"", "", "", "", ""
};
readonly string[] volumeserial =
readonly string[] _volumeserial =
{
null, null, null, null, null
};
readonly string[] type =
readonly string[] _type =
{
"HTFS", "HTFS", "HTFS", "HTFS", "HTFS"
};
@@ -90,18 +90,18 @@ namespace Aaru.Tests.Filesystems
[Test]
public void Test()
{
for(int i = 0; i < testfiles.Length; i++)
for(int i = 0; i < _testfiles.Length; i++)
{
string location = Path.Combine(Consts.TestFilesRoot, "Filesystems", "High Throughtput File System",
testfiles[i]);
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems", "High Throughtput 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]);
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();
var wholePart = new Partition
@@ -111,13 +111,13 @@ namespace Aaru.Tests.Filesystems
Size = image.Info.Sectors * image.Info.SectorSize
};
Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]);
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]);
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]);
}
}
}
@@ -125,42 +125,42 @@ namespace Aaru.Tests.Filesystems
[TestFixture]
public class HtfsMbr
{
readonly string[] testfiles =
readonly string[] _testfiles =
{
"scoopenserver_5.0.7hw.aif"
};
readonly ulong[] sectors =
readonly ulong[] _sectors =
{
2097152
};
readonly uint[] sectorsize =
readonly uint[] _sectorsize =
{
512
};
readonly long[] clusters =
readonly long[] _clusters =
{
1020096
};
readonly int[] clustersize =
readonly int[] _clustersize =
{
1024
};
readonly string[] volumename =
readonly string[] _volumename =
{
"Volume label"
};
readonly string[] volumeserial =
readonly string[] _volumeserial =
{
null
};
readonly string[] type =
readonly string[] _type =
{
"HTFS"
};
@@ -168,17 +168,17 @@ namespace Aaru.Tests.Filesystems
[Test]
public void Test()
{
for(int i = 0; i < testfiles.Length; i++)
for(int i = 0; i < _testfiles.Length; i++)
{
string location = Path.Combine(Consts.TestFilesRoot, "Filesystems",
"High Throughtput File System (MBR)", testfiles[i]);
string location = Path.Combine(Consts.TEST_FILES_ROOT, "Filesystems",
"High Throughtput File System (MBR)", _testfiles[i]);
IFilter filter = new ZZZNoFilter();
filter.Open(location);
IMediaImage image = new AaruFormat();
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]);
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 SysVfs();
int part = -1;
@@ -191,14 +191,14 @@ namespace Aaru.Tests.Filesystems
break;
}
Assert.AreNotEqual(-1, part, $"Partition not found on {testfiles[i]}");
Assert.AreEqual(true, fs.Identify(image, partitions[part]), testfiles[i]);
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]);
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]);
}
}
}