General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:44 +00:00
parent bc6e432565
commit 762e3eb6d2
1321 changed files with 44657 additions and 45479 deletions

View File

@@ -26,14 +26,14 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.Tests.Checksums;
using System.IO;
using Aaru.Checksums;
using Aaru.CommonTypes.Interfaces;
using FluentAssertions;
using NUnit.Framework;
namespace Aaru.Tests.Checksums;
[TestFixture]
public class Crc64
{
@@ -65,7 +65,7 @@ public class Crc64
[Test]
public void EmptyData()
{
byte[] data = new byte[1048576];
var data = new byte[1048576];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "empty"), FileMode.Open,
FileAccess.Read);
@@ -87,7 +87,7 @@ public class Crc64
[Test]
public void EmptyInstance()
{
byte[] data = new byte[1048576];
var data = new byte[1048576];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "empty"), FileMode.Open,
FileAccess.Read);
@@ -104,10 +104,10 @@ public class Crc64
[Test]
public void RandomData()
{
byte[] data = new byte[1048576];
var data = new byte[1048576];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"),
FileMode.Open, FileAccess.Read);
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"), FileMode.Open,
FileAccess.Read);
fs.Read(data, 0, 1048576);
fs.Close();
@@ -126,10 +126,10 @@ public class Crc64
[Test]
public void RandomInstance()
{
byte[] data = new byte[1048576];
var data = new byte[1048576];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"),
FileMode.Open, FileAccess.Read);
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"), FileMode.Open,
FileAccess.Read);
fs.Read(data, 0, 1048576);
fs.Close();
@@ -143,10 +143,10 @@ public class Crc64
[Test]
public void PartialInstance15()
{
byte[] data = new byte[15];
var data = new byte[15];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"),
FileMode.Open, FileAccess.Read);
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"), FileMode.Open,
FileAccess.Read);
fs.Read(data, 0, 15);
fs.Close();
@@ -160,10 +160,10 @@ public class Crc64
[Test]
public void PartialInstance31()
{
byte[] data = new byte[31];
var data = new byte[31];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"),
FileMode.Open, FileAccess.Read);
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"), FileMode.Open,
FileAccess.Read);
fs.Read(data, 0, 31);
fs.Close();
@@ -177,10 +177,10 @@ public class Crc64
[Test]
public void PartialInstance63()
{
byte[] data = new byte[63];
var data = new byte[63];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"),
FileMode.Open, FileAccess.Read);
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"), FileMode.Open,
FileAccess.Read);
fs.Read(data, 0, 63);
fs.Close();
@@ -194,10 +194,10 @@ public class Crc64
[Test]
public void PartialInstance2352()
{
byte[] data = new byte[2352];
var data = new byte[2352];
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"),
FileMode.Open, FileAccess.Read);
var fs = new FileStream(Path.Combine(Consts.TEST_FILES_ROOT, "Checksum test files", "random"), FileMode.Open,
FileAccess.Read);
fs.Read(data, 0, 2352);
fs.Close();