mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using System.IO;
|
|
using BinaryObjectScanner.Packer;
|
|
using Xunit;
|
|
|
|
namespace BinaryObjectScanner.Test.Packer
|
|
{
|
|
public class WinZipSFXTests
|
|
{
|
|
[Fact]
|
|
public void CheckNewExecutableTest()
|
|
{
|
|
string file = "filename";
|
|
SabreTools.Data.Models.NewExecutable.Executable model = new();
|
|
Stream source = new MemoryStream(new byte[1024]);
|
|
SabreTools.Serialization.Wrappers.NewExecutable exe = new(model, source);
|
|
|
|
var checker = new WinZipSFX();
|
|
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
|
|
Assert.Null(actual);
|
|
}
|
|
|
|
[Fact]
|
|
public void CheckPortableExecutableTest()
|
|
{
|
|
string file = "filename";
|
|
SabreTools.Data.Models.PortableExecutable.Executable model = new();
|
|
Stream source = new MemoryStream(new byte[1024]);
|
|
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
|
|
|
|
var checker = new WinZipSFX();
|
|
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
|
|
Assert.Null(actual);
|
|
}
|
|
}
|
|
}
|