mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add quick GetMachine and GetSource DB tests
This commit is contained in:
@@ -96,7 +96,17 @@ namespace SabreTools.DatFiles.Test
|
|||||||
|
|
||||||
#region GetMachine
|
#region GetMachine
|
||||||
|
|
||||||
// TODO: Add GetMachine tests
|
[Fact]
|
||||||
|
public void GetMachineTest()
|
||||||
|
{
|
||||||
|
Machine machine = new Machine();
|
||||||
|
var dict = new ItemDictionaryDB();
|
||||||
|
long machineIndex = dict.AddMachine(machine);
|
||||||
|
|
||||||
|
Assert.Equal(0, machineIndex);
|
||||||
|
var actual = dict.GetMachine(machineIndex);
|
||||||
|
Assert.NotNull(actual);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -108,7 +118,17 @@ namespace SabreTools.DatFiles.Test
|
|||||||
|
|
||||||
#region GetSource
|
#region GetSource
|
||||||
|
|
||||||
// TODO: Add GetSource tests
|
[Fact]
|
||||||
|
public void GetSourceTest()
|
||||||
|
{
|
||||||
|
Source source = new Source(0, source: null);
|
||||||
|
var dict = new ItemDictionaryDB();
|
||||||
|
long sourceIndex = dict.AddSource(source);
|
||||||
|
|
||||||
|
Assert.Equal(0, sourceIndex);
|
||||||
|
var actual = dict.GetSource(sourceIndex);
|
||||||
|
Assert.NotNull(actual);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user