mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General cleanup and refactor.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using Aaru.Decoders.SecureDigital;
|
||||
using Aaru.Helpers;
|
||||
using FluentAssertions.Execution;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace Aaru.Tests.Devices.SecureDigital;
|
||||
|
||||
using Aaru.Decoders.SecureDigital;
|
||||
using Aaru.Helpers;
|
||||
using FluentAssertions.Execution;
|
||||
using NUnit.Framework;
|
||||
|
||||
[TestFixture]
|
||||
public class SCR
|
||||
{
|
||||
@@ -137,15 +139,13 @@ public class SCR
|
||||
[Test]
|
||||
public void Test()
|
||||
{
|
||||
for(int i = 0; i < cards.Length; i++)
|
||||
{
|
||||
for(var i = 0; i < cards.Length; i++)
|
||||
using(new AssertionScope())
|
||||
{
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
int count = Marshal.ConvertFromHexAscii(scrs[i], out byte[] response);
|
||||
Assert.AreEqual(8, count, $"Size - {cards[i]}");
|
||||
Decoders.SecureDigital.SCR scr = Decoders.SecureDigital.Decoders.DecodeSCR(response);
|
||||
Aaru.Decoders.SecureDigital.SCR scr = Decoders.DecodeSCR(response);
|
||||
Assert.IsNotNull(scr, $"Decoded - {cards[i]}");
|
||||
Assert.AreEqual(structure_version[i], scr.Structure, $"Version - {cards[i]}");
|
||||
Assert.AreEqual(specification_version[i], scr.Spec, $"Specification version - {cards[i]}");
|
||||
@@ -165,7 +165,5 @@ public class SCR
|
||||
|
||||
Assert.AreEqual(mfg[i], scr.ManufacturerReserved, $"Manufacturer reserved - {cards[i]}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user