Files

34 lines
1.0 KiB
C#
Raw Permalink Normal View History

2024-12-02 11:07:01 -05:00
using System.IO;
using BinaryObjectScanner.FileType;
using Xunit;
namespace BinaryObjectScanner.Test.FileType
{
public class RealArcadeInstallerTests
{
2025-09-24 12:14:31 -04:00
private static readonly SabreTools.Serialization.Wrappers.RealArcadeInstaller wrapper
2025-09-29 08:01:50 -04:00
= new(new SabreTools.Data.Models.RealArcade.RgsFile(), new MemoryStream(new byte[1024]));
2025-09-24 12:14:31 -04:00
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-24 12:14:31 -04:00
var detectable = new RealArcadeInstaller(wrapper);
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-24 12:14:31 -04:00
var detectable = new RealArcadeInstaller(wrapper);
2024-12-02 11:07:01 -05:00
string? actual = detectable.Detect(stream, file, includeDebug: false);
2025-09-24 12:14:31 -04:00
Assert.Equal("RealArcade Installer", actual);
2024-12-02 11:07:01 -05:00
}
}
}