mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add missing same-type test
This commit is contained in:
@@ -43,6 +43,31 @@ namespace SabreTools.DatItems.Test
|
|||||||
Assert.Equal((DupeType)0x00, actual);
|
Assert.Equal((DupeType)0x00, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void GetDuplicateStatus_MismatchedHashes_NoDupe()
|
||||||
|
{
|
||||||
|
var machineA = new Machine();
|
||||||
|
machineA.SetFieldValue<string?>(Models.Metadata.Machine.NameKey, "name-same");
|
||||||
|
|
||||||
|
var machineB = new Machine();
|
||||||
|
machineB.SetFieldValue<string?>(Models.Metadata.Machine.NameKey, "name-same");
|
||||||
|
|
||||||
|
var romA = new Rom();
|
||||||
|
romA.SetName("same-name");
|
||||||
|
romA.SetFieldValue(Models.Metadata.Rom.CRCKey, "BEEFDEAD");
|
||||||
|
romA.SetFieldValue<Source?>(DatItem.SourceKey, new Source(0));
|
||||||
|
romA.CopyMachineInformation(machineA);
|
||||||
|
|
||||||
|
var romB = new Rom();
|
||||||
|
romB.SetName("same-name");
|
||||||
|
romB.SetFieldValue(Models.Metadata.Rom.CRCKey, "DEADBEEF");
|
||||||
|
romB.SetFieldValue<Source?>(DatItem.SourceKey, new Source(1));
|
||||||
|
romB.CopyMachineInformation(machineB);
|
||||||
|
|
||||||
|
var actual = romA.GetDuplicateStatus(romB);
|
||||||
|
Assert.Equal((DupeType)0x00, actual);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void GetDuplicateStatus_DifferentSource_NameMatch_ExternalAll()
|
public void GetDuplicateStatus_DifferentSource_NameMatch_ExternalAll()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user