Files
BinaryObjectScanner/BinaryObjectScanner.Test/FileType/LinearExecutableTests.cs

31 lines
803 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
{
2025-09-06 09:53:34 -04:00
public class LinearExecutableTests
2024-12-02 11:07:01 -05:00
{
[Fact]
public void DetectFile_EmptyString_Null()
2024-12-02 11:07:01 -05:00
{
string file = string.Empty;
2025-09-06 09:53:34 -04:00
var detectable = new LinearExecutable();
2024-12-02 11:07:01 -05:00
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;
2025-09-06 09:53:34 -04:00
var detectable = new LinearExecutable();
2024-12-02 11:07:01 -05:00
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.Null(actual);
}
}
}