Files
BinaryObjectScanner/BinaryObjectScanner.Test/FileType/PLJTests.cs
2025-09-06 10:40:26 -04:00

36 lines
987 B
C#

using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class PLJTests
{
private static readonly SabreTools.Serialization.Wrappers.PlayJAudioFile wrapper
= new(new SabreTools.Models.PlayJ.AudioFile(), new MemoryStream());
[Fact]
public void DetectFile_EmptyString_Null()
{
string file = string.Empty;
var detectable = new PLJ(wrapper);
string? actual = detectable.Detect(file, includeDebug: false);
Assert.Null(actual);
}
[Fact]
public void DetectStream_EmptyStream_Empty()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
var detectable = new PLJ(wrapper);
string? actual = detectable.Detect(stream, file, includeDebug: false);
Assert.NotNull(actual);
Assert.Empty(actual);
}
}
}