mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Add detect dictionary test for executable
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user