Add and use IndexedTable private class

This commit is contained in:
Matt Nadareski
2026-04-16 22:08:03 -04:00
parent c409c47ae5
commit 7acb97e78e
7 changed files with 232 additions and 192 deletions

View File

@@ -121,7 +121,7 @@ namespace SabreTools.Metadata.DatFiles.Test
datFile.MachineDescriptionToName();
Machine actualMachine = Assert.Single(datFile.GetMachinesDB()).Value;
Machine actualMachine = Assert.Single(datFile.GetMachinesDB());
Assert.Equal("description", actualMachine.Name);
Assert.Equal("description", actualMachine.Description);
}
@@ -275,8 +275,8 @@ namespace SabreTools.Metadata.DatFiles.Test
datFile.SetOneGamePerRegion(regions);
var actualWorldMachine = Assert.Single(datFile.GetMachinesDB());
Assert.NotNull(actualWorldMachine.Value);
Assert.Equal("machine (World)", actualWorldMachine.Value.Name);
Assert.NotNull(actualWorldMachine);
Assert.Equal("machine (World)", actualWorldMachine.Name);
}
#endregion
@@ -318,7 +318,7 @@ namespace SabreTools.Metadata.DatFiles.Test
datFile.StripSceneDatesFromItems();
Machine actualMachine = Assert.Single(datFile.GetMachinesDB()).Value;
Machine actualMachine = Assert.Single(datFile.GetMachinesDB());
Assert.Equal("machine-name", actualMachine.Name);
}

View File

@@ -1010,7 +1010,7 @@ namespace SabreTools.Metadata.DatFiles.Test
datFile.BucketBy(ItemKey.Machine);
datFile.RemoveMachineRelationshipTags();
Machine actual = Assert.Single(datFile.GetMachinesDB()).Value;
Machine actual = Assert.Single(datFile.GetMachinesDB());
Assert.Null(actual.CloneOf);
Assert.Null(actual.RomOf);
Assert.Null(actual.SampleOf);

View File

@@ -335,7 +335,7 @@ namespace SabreTools.Metadata.DatFiles.Test
long sourceIndex = dict.AddSource(source);
Assert.Equal(0, sourceIndex);
Assert.Single(dict.GetSources());
Assert.NotNull(dict.GetSource(0).Value);
}
#endregion