Added: Complete Real Test

This commit is contained in:
TheJoKlLa
2020-11-07 01:14:51 +01:00
parent 872aeccee7
commit 6c51e40891
23 changed files with 1020 additions and 1199 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NFC.Mifare_DESFire;
@ -129,6 +130,25 @@ namespace NFC.ISO7816_4
return array;
}
public override bool Equals(object obj)
{
return obj is APDUResponse response &&
EqualityComparer<byte[]>.Default.Equals(Body, response.Body) &&
SW1 == response.SW1 &&
SW2 == response.SW2;
}
public override int GetHashCode()
{
return HashCode.Combine(Body, SW1, SW2);
}
public override string ToString()
{
string pattern = "SW1: 0x{0:x} | SW2: 0x{1:x} | Body: 0x{2:x}";
return string.Format(pattern, SW1, SW2, Body);
}
#endregion
}
}