mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Start rearranging things
This commit is contained in:
@@ -15,7 +15,7 @@ namespace BinaryObjectScanner.Test
|
||||
WrapperType.AACSMediaKeyBlock,
|
||||
WrapperType.BDPlusSVM,
|
||||
//WrapperType.CIA,
|
||||
WrapperType.Executable,
|
||||
//WrapperType.Executable,
|
||||
WrapperType.LDSCRYPT,
|
||||
//WrapperType.N3DS,
|
||||
//WrapperType.Nitro,
|
||||
@@ -63,7 +63,7 @@ namespace BinaryObjectScanner.Test
|
||||
WrapperType.BZip2,
|
||||
WrapperType.CFB,
|
||||
//WrapperType.CIA,
|
||||
WrapperType.Executable,
|
||||
//WrapperType.Executable,
|
||||
WrapperType.GCF,
|
||||
WrapperType.GZip,
|
||||
WrapperType.InstallShieldArchiveV3,
|
||||
|
||||
30
BinaryObjectScanner.Test/FileType/LinearExecutableTests.cs
Normal file
30
BinaryObjectScanner.Test/FileType/LinearExecutableTests.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.IO;
|
||||
using BinaryObjectScanner.FileType;
|
||||
using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class LinearExecutableTests
|
||||
{
|
||||
[Fact]
|
||||
public void DetectFile_EmptyString_Null()
|
||||
{
|
||||
string file = string.Empty;
|
||||
var detectable = new LinearExecutable();
|
||||
|
||||
string? actual = detectable.Detect(file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DetectStream_EmptyStream_Null()
|
||||
{
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
var detectable = new LinearExecutable();
|
||||
|
||||
string? actual = detectable.Detect(stream, file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,13 @@ using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class ExecutableTests
|
||||
public class MSDOSTests
|
||||
{
|
||||
[Fact]
|
||||
public void DetectFile_EmptyString_Null()
|
||||
{
|
||||
string file = string.Empty;
|
||||
var detectable = new Executable();
|
||||
var detectable = new MSDOS();
|
||||
|
||||
string? actual = detectable.Detect(file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
@@ -21,7 +21,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
var detectable = new Executable();
|
||||
var detectable = new MSDOS();
|
||||
|
||||
string? actual = detectable.Detect(stream, file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
30
BinaryObjectScanner.Test/FileType/NewExecutableTests.cs
Normal file
30
BinaryObjectScanner.Test/FileType/NewExecutableTests.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.IO;
|
||||
using BinaryObjectScanner.FileType;
|
||||
using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class NewExecutableTests
|
||||
{
|
||||
[Fact]
|
||||
public void DetectFile_EmptyString_Null()
|
||||
{
|
||||
string file = string.Empty;
|
||||
var detectable = new NewExecutable();
|
||||
|
||||
string? actual = detectable.Detect(file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DetectStream_EmptyStream_Null()
|
||||
{
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
var detectable = new NewExecutable();
|
||||
|
||||
string? actual = detectable.Detect(stream, file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
30
BinaryObjectScanner.Test/FileType/PortableExecutableTests.cs
Normal file
30
BinaryObjectScanner.Test/FileType/PortableExecutableTests.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.IO;
|
||||
using BinaryObjectScanner.FileType;
|
||||
using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class PortableExecutableTests
|
||||
{
|
||||
[Fact]
|
||||
public void DetectFile_EmptyString_Null()
|
||||
{
|
||||
string file = string.Empty;
|
||||
var detectable = new PortableExecutable();
|
||||
|
||||
string? actual = detectable.Detect(file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DetectStream_EmptyStream_Null()
|
||||
{
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
var detectable = new PortableExecutable();
|
||||
|
||||
string? actual = detectable.Detect(stream, file, includeDebug: false);
|
||||
Assert.Null(actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user