Fix some over-accessible fields

This commit is contained in:
Matt Nadareski
2024-10-19 23:17:37 -04:00
parent 16f173099d
commit 4d5ac92125
15 changed files with 142 additions and 154 deletions

View File

@@ -45,13 +45,13 @@ namespace SabreTools.Test.DatItems
var romA = new Rom();
romA.SetName("same-name");
romA.SetFieldValue(Models.Metadata.Rom.CRCKey, "DEADBEEF");
romA.SetFieldValue<Source?>(DatItem.SourceKey, new Source { Index = 0 });
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 { Index = 1 });
romB.SetFieldValue<Source?>(DatItem.SourceKey, new Source(1));
romB.CopyMachineInformation(machineB);
var actual = romA.GetDuplicateStatus(romB);
@@ -70,13 +70,13 @@ namespace SabreTools.Test.DatItems
var romA = new Rom();
romA.SetName("same-name");
romA.SetFieldValue(Models.Metadata.Rom.CRCKey, "DEADBEEF");
romA.SetFieldValue<Source?>(DatItem.SourceKey, new Source { Index = 0 });
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 { Index = 1 });
romB.SetFieldValue<Source?>(DatItem.SourceKey, new Source(1));
romB.CopyMachineInformation(machineB);
var actual = romA.GetDuplicateStatus(romB);
@@ -95,13 +95,13 @@ namespace SabreTools.Test.DatItems
var romA = new Rom();
romA.SetName("same-name");
romA.SetFieldValue(Models.Metadata.Rom.CRCKey, "DEADBEEF");
romA.SetFieldValue<Source?>(DatItem.SourceKey, new Source { Index = 0 });
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 { Index = 0 });
romB.SetFieldValue<Source?>(DatItem.SourceKey, new Source(0));
romB.CopyMachineInformation(machineB);
var actual = romA.GetDuplicateStatus(romB);
@@ -120,13 +120,13 @@ namespace SabreTools.Test.DatItems
var romA = new Rom();
romA.SetName("same-name");
romA.SetFieldValue(Models.Metadata.Rom.CRCKey, "DEADBEEF");
romA.SetFieldValue<Source?>(DatItem.SourceKey, new Source { Index = 0 });
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 { Index = 0 });
romB.SetFieldValue<Source?>(DatItem.SourceKey, new Source(0));
romB.CopyMachineInformation(machineB);
var actual = romA.GetDuplicateStatus(romB);