Add detect dictionary test for executable

This commit is contained in:
Matt Nadareski
2024-12-02 12:00:55 -05:00
parent 8c0a8f6856
commit 8bcf81fbbd

View File

@@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
@@ -26,6 +27,17 @@ namespace BinaryObjectScanner.Test.FileType
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectDict_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
Func<string, ProtectionDictionary>? getProtections = null;
var detectable = new Executable();
ProtectionDictionary actual = detectable.DetectDict(stream, file, getProtections, includeDebug: false);
Assert.Empty(actual);
}
}
}