2026-02-07 18:07:36 -05:00
|
|
|
using System.IO;
|
|
|
|
|
using BinaryObjectScanner.Protection;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace BinaryObjectScanner.Test.Protection
|
|
|
|
|
{
|
|
|
|
|
public class CEGTests
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void CheckPortableExecutableTest()
|
|
|
|
|
{
|
|
|
|
|
string file = "filename";
|
|
|
|
|
SabreTools.Data.Models.PortableExecutable.Executable model = new();
|
|
|
|
|
Stream source = new MemoryStream(new byte[1024]);
|
2026-06-12 11:00:13 -04:00
|
|
|
SabreTools.Wrappers.PortableExecutable exe = new(model, source);
|
2026-02-07 18:07:36 -05:00
|
|
|
|
2026-03-17 13:20:30 -04:00
|
|
|
var checker = new CEG();
|
2026-02-07 18:07:36 -05:00
|
|
|
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
|
|
|
|
|
Assert.Null(actual);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|