mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add listrom deserialization test, fix issues
This commit is contained in:
@@ -98,7 +98,7 @@ namespace SabreTools.Test.Parser
|
||||
[Theory]
|
||||
[InlineData("test-sfv.sfv", Hash.CRC)]
|
||||
[InlineData("test-md5.md5", Hash.MD5)]
|
||||
[InlineData("test-sha1.sha1", Hash.SHA1)]
|
||||
[InlineData("test-sha1.sha1", Hash.SHA1)]
|
||||
[InlineData("test-sha256.sha256", Hash.SHA256)]
|
||||
[InlineData("test-sha384.sha384", Hash.SHA384)]
|
||||
[InlineData("test-sha512.sha512", Hash.SHA512)]
|
||||
@@ -142,6 +142,23 @@ namespace SabreTools.Test.Parser
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ListromDeserializeTest()
|
||||
{
|
||||
// Open the file for reading
|
||||
string filename = System.IO.Path.Combine(Environment.CurrentDirectory, "TestData", "test-listrom-files.txt.gz");
|
||||
|
||||
// Deserialize the file
|
||||
var dat = Serialization.Listrom.Deserialize(filename);
|
||||
|
||||
// Validate the values
|
||||
Assert.NotNull(dat?.Set);
|
||||
Assert.Equal(45861, dat.Set.Length);
|
||||
|
||||
// Validate we're not missing any attributes or elements
|
||||
Assert.Empty(dat.ADDITIONAL_ELEMENTS);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ListxmlDeserializeTest()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user