using System.IO; using BinaryObjectScanner.Packer; using Xunit; namespace BinaryObjectScanner.Test.Packer { public class EmbeddedExecutableTests { [Fact] public void CheckPortableExecutableTest() { string file = "filename"; SabreTools.Models.PortableExecutable.Executable model = new(); Stream source = new MemoryStream(); SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source); var checker = new EmbeddedExecutable(); string? actual = checker.CheckExecutable(file, pex, includeDebug: false); Assert.Null(actual); } [Fact] public void ExtractPortableExecutableTest() { string file = "filename"; SabreTools.Models.PortableExecutable.Executable model = new(); Stream source = new MemoryStream(); SabreTools.Serialization.Wrappers.PortableExecutable pex = new(model, source); string outputDir = string.Empty; var checker = new EmbeddedExecutable(); bool actual = checker.Extract(file, pex, outputDir, includeDebug: false); Assert.False(actual); } } }