2021-02-23 04:29:24 +00:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// Aaru Data Preservation Suite
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : ImageDisk.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : Aaru unit testing.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
|
// it under the terms of the GNU General Public License as
|
|
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
//
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2024-05-01 04:17:32 +01:00
|
|
|
|
// Copyright © 2011-2024 Natalia Portillo
|
2021-02-23 04:29:24 +00:00
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using Aaru.CommonTypes;
|
2021-03-02 00:35:16 +00:00
|
|
|
|
using Aaru.CommonTypes.Interfaces;
|
2023-10-06 01:16:28 +01:00
|
|
|
|
using Aaru.Images;
|
2021-02-23 04:29:24 +00:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Tests.Images.DiskUtilities;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
[TestFixture]
|
|
|
|
|
|
public class ImageDisk : BlockMediaImageTest
|
2021-02-23 04:29:24 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public override string DataFolder =>
|
2022-11-13 05:48:58 +00:00
|
|
|
|
Path.Combine(Consts.TestFilesRoot, "Media image formats", "disk-analyse", "ImageDisk");
|
2023-10-03 23:44:33 +01:00
|
|
|
|
|
2022-03-15 01:37:37 +00:00
|
|
|
|
public override IMediaImage Plugin => new Imd();
|
2021-03-02 02:59:20 +00:00
|
|
|
|
|
2024-05-01 04:39:38 +01:00
|
|
|
|
public override BlockImageTestExpected[] Tests =>
|
|
|
|
|
|
[
|
2022-03-06 13:29:38 +00:00
|
|
|
|
new BlockImageTestExpected
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "mf2dd_acorn.imd.lz",
|
|
|
|
|
|
MediaType = MediaType.ACORN_35_DS_DD,
|
|
|
|
|
|
Sectors = 800,
|
|
|
|
|
|
SectorSize = 1024,
|
2022-03-15 01:37:37 +00:00
|
|
|
|
Md5 = "2626f65b49ec085253c41fa2e2a9e788"
|
2022-03-06 13:29:38 +00:00
|
|
|
|
},
|
|
|
|
|
|
new BlockImageTestExpected
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "mf2dd_fdformat_820.imd.lz",
|
|
|
|
|
|
MediaType = MediaType.FDFORMAT_35_DD,
|
|
|
|
|
|
Sectors = 1640,
|
|
|
|
|
|
SectorSize = 512,
|
2022-03-15 01:37:37 +00:00
|
|
|
|
Md5 = "9d978dff1196b456b8372d78e6b17970"
|
2022-03-06 13:29:38 +00:00
|
|
|
|
},
|
|
|
|
|
|
new BlockImageTestExpected
|
|
|
|
|
|
{
|
|
|
|
|
|
TestFile = "mf2hd_2m.imd.lz",
|
|
|
|
|
|
MediaType = MediaType.Unknown,
|
|
|
|
|
|
Sectors = 1812,
|
|
|
|
|
|
SectorSize = 1024,
|
2022-03-15 01:37:37 +00:00
|
|
|
|
Md5 = "7ee82cecd23b30cc9aa6f0ec59877851"
|
2022-03-06 13:29:38 +00:00
|
|
|
|
},
|
|
|
|
|
|
new BlockImageTestExpected
|
2021-03-02 02:59:20 +00:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
TestFile = "mf2hd_fdformat_172.imd.lz",
|
|
|
|
|
|
MediaType = MediaType.FDFORMAT_35_HD,
|
|
|
|
|
|
Sectors = 3444,
|
|
|
|
|
|
SectorSize = 512,
|
2022-03-15 01:37:37 +00:00
|
|
|
|
Md5 = "9dea1e119a73a21a38d134f36b2e5564"
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2024-05-01 04:39:38 +01:00
|
|
|
|
];
|
2021-02-23 04:29:24 +00:00
|
|
|
|
}
|