Files
BinaryObjectScanner/BinaryObjectScanner.Test/FileType/ExecutableTests.cs

31 lines
785 B
C#
Raw Normal View History

2025-09-02 20:31:30 -04:00
using System.IO;
2024-12-02 11:07:01 -05:00
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class ExecutableTests
{
[Fact]
public void DetectFile_EmptyString_Null()
2024-12-02 11:07:01 -05:00
{
string file = string.Empty;
var detectable = new Executable();
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Null()
2024-12-02 11:07:01 -05:00
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new Executable();
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}