mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-08 05:37:43 +00:00
31 lines
779 B
C#
31 lines
779 B
C#
using System.IO;
|
|
using BinaryObjectScanner.FileType;
|
|
using Xunit;
|
|
|
|
namespace BinaryObjectScanner.Test.FileType
|
|
{
|
|
public class TextfileTests
|
|
{
|
|
[Fact]
|
|
public void DetectFile_EmptyString_Null()
|
|
{
|
|
string file = string.Empty;
|
|
var detectable = new Textfile();
|
|
|
|
string? actual = detectable.Detect(file, includeDebug: false);
|
|
Assert.Null(actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void DetectStream_EmptyStream_Null()
|
|
{
|
|
Stream? stream = new MemoryStream();
|
|
string file = string.Empty;
|
|
var detectable = new Textfile();
|
|
|
|
string? actual = detectable.Detect(stream, file, includeDebug: false);
|
|
Assert.Null(actual);
|
|
}
|
|
}
|
|
}
|