mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Simplify using new base class
This commit is contained in:
@@ -58,39 +58,39 @@ namespace BinaryObjectScanner.Test
|
||||
|
||||
private static readonly List<WrapperType> _extractableTypes =
|
||||
[
|
||||
WrapperType.BFPK,
|
||||
WrapperType.BSP,
|
||||
WrapperType.BZip2,
|
||||
WrapperType.CFB,
|
||||
//WrapperType.CIA,
|
||||
//WrapperType.Executable, // TODO: This needs to be split internally
|
||||
WrapperType.GCF,
|
||||
WrapperType.GZip,
|
||||
WrapperType.InstallShieldArchiveV3,
|
||||
WrapperType.InstallShieldCAB,
|
||||
WrapperType.LZKWAJ,
|
||||
WrapperType.LZQBasic,
|
||||
WrapperType.LZSZDD,
|
||||
WrapperType.MicrosoftCAB,
|
||||
WrapperType.MoPaQ,
|
||||
//WrapperType.N3DS,
|
||||
//WrapperType.NCF,
|
||||
//WrapperType.Nitro,
|
||||
WrapperType.PAK,
|
||||
WrapperType.PFF,
|
||||
WrapperType.PKZIP,
|
||||
//WrapperType.PlayJAudioFile, // TODO: Create wrapper to reenable test
|
||||
//WrapperType.Quantum,
|
||||
WrapperType.RAR,
|
||||
WrapperType.SevenZip,
|
||||
// WrapperType.BFPK, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.BSP, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.BZip2, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.CFB, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.CIA,
|
||||
// WrapperType.Executable, // TODO: This needs to be split internally
|
||||
// WrapperType.GCF, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.GZip, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.InstallShieldArchiveV3, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.InstallShieldCAB, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.LZKWAJ, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.LZQBasic, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.LZSZDD, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.MicrosoftCAB, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.MoPaQ, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.N3DS,
|
||||
// WrapperType.NCF,
|
||||
// WrapperType.Nitro,
|
||||
// WrapperType.PAK, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.PFF, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.PKZIP, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.PlayJAudioFile, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.Quantum, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.RAR, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.SevenZip, // TODO: Create wrapper to reenable test
|
||||
WrapperType.SFFS,
|
||||
WrapperType.SGA,
|
||||
WrapperType.TapeArchive,
|
||||
WrapperType.VBSP,
|
||||
WrapperType.VPK,
|
||||
WrapperType.WAD,
|
||||
WrapperType.XZ,
|
||||
WrapperType.XZP,
|
||||
// WrapperType.SGA, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.TapeArchive, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.VBSP, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.VPK, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.WAD, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.XZ, // TODO: Create wrapper to reenable test
|
||||
// WrapperType.XZP, // TODO: Create wrapper to reenable test
|
||||
];
|
||||
|
||||
[Theory]
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class BFPKTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.BFPK wrapper
|
||||
= new(new SabreTools.Models.BFPK.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BFPK();
|
||||
var extractable = new BFPK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BFPK();
|
||||
var extractable = new BFPK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BFPK();
|
||||
var extractable = new BFPK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class BSPTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.BSP wrapper
|
||||
= new(new SabreTools.Models.BSP.BspFile(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BSP();
|
||||
var extractable = new BSP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BSP();
|
||||
var extractable = new BSP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BSP();
|
||||
var extractable = new BSP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class BZip2Tests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.BZip2 wrapper
|
||||
= new(new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BZip2();
|
||||
var extractable = new BZip2(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BZip2();
|
||||
var extractable = new BZip2(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new BZip2();
|
||||
var extractable = new BZip2(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class CFBTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.CFB wrapper
|
||||
= new(new SabreTools.Models.CFB.Binary(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new CFB();
|
||||
var extractable = new CFB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new CFB();
|
||||
var extractable = new CFB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new CFB();
|
||||
var extractable = new CFB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class GCFTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.GCF wrapper
|
||||
= new(new SabreTools.Models.GCF.File(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new GCF();
|
||||
var extractable = new GCF(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new GCF();
|
||||
var extractable = new GCF(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new GCF();
|
||||
var extractable = new GCF(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class GZIPTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.GZip wrapper
|
||||
= new(new SabreTools.Models.GZIP.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new GZip();
|
||||
var extractable = new GZip(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new GZip();
|
||||
var extractable = new GZip(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new GZip();
|
||||
var extractable = new GZip(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class InstallShieldArchiveV3Tests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.InstallShieldArchiveV3 wrapper
|
||||
= new(new SabreTools.Models.InstallShieldArchiveV3.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldArchiveV3();
|
||||
var extractable = new InstallShieldArchiveV3(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldArchiveV3();
|
||||
var extractable = new InstallShieldArchiveV3(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldArchiveV3();
|
||||
var extractable = new InstallShieldArchiveV3(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using BinaryObjectScanner.FileType;
|
||||
using Xunit;
|
||||
|
||||
@@ -7,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class InstallShieldCABTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.InstallShieldCabinet wrapper
|
||||
= new(new SabreTools.Models.InstallShieldCabinet.Cabinet(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldCAB();
|
||||
var extractable = new InstallShieldCAB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -24,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldCAB();
|
||||
var extractable = new InstallShieldCAB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -36,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new InstallShieldCAB();
|
||||
var extractable = new InstallShieldCAB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class LZKWAJTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.LZKWAJ wrapper
|
||||
= new(new SabreTools.Models.LZ.KWAJFile(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZKWAJ();
|
||||
var extractable = new LZKWAJ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZKWAJ();
|
||||
var extractable = new LZKWAJ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZKWAJ();
|
||||
var extractable = new LZKWAJ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class LZQBasicTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.LZQBasic wrapper
|
||||
= new(new SabreTools.Models.LZ.QBasicFile(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZQBasic();
|
||||
var extractable = new LZQBasic(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZQBasic();
|
||||
var extractable = new LZQBasic(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZQBasic();
|
||||
var extractable = new LZQBasic(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class LZSZDDTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.LZSZDD wrapper
|
||||
= new(new SabreTools.Models.LZ.SZDDFile(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZSZDD();
|
||||
var extractable = new LZSZDD(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZSZDD();
|
||||
var extractable = new LZSZDD(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new LZSZDD();
|
||||
var extractable = new LZSZDD(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class MPQTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.MoPaQ wrapper
|
||||
= new(new SabreTools.Models.MoPaQ.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new MPQ();
|
||||
var extractable = new MPQ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new MPQ();
|
||||
var extractable = new MPQ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new MPQ();
|
||||
var extractable = new MPQ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class MicrosoftCABTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.MicrosoftCabinet wrapper
|
||||
= new(new SabreTools.Models.MicrosoftCabinet.Cabinet(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new MicrosoftCAB();
|
||||
var extractable = new MicrosoftCAB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new MicrosoftCAB();
|
||||
var extractable = new MicrosoftCAB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new MicrosoftCAB();
|
||||
var extractable = new MicrosoftCAB(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class PAKTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.PAK wrapper
|
||||
= new(new SabreTools.Models.PAK.File(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PAK();
|
||||
var extractable = new PAK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PAK();
|
||||
var extractable = new PAK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PAK();
|
||||
var extractable = new PAK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class PFFTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.PFF wrapper
|
||||
= new(new SabreTools.Models.PFF.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PFF();
|
||||
var extractable = new PFF(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PFF();
|
||||
var extractable = new PFF(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PFF();
|
||||
var extractable = new PFF(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class PKZIPTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.PKZIP wrapper
|
||||
= new(new SabreTools.Models.PKZIP.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PKZIP();
|
||||
var extractable = new PKZIP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PKZIP();
|
||||
var extractable = new PKZIP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new PKZIP();
|
||||
var extractable = new PKZIP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class QuantumTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.Quantum wrapper
|
||||
= new(new SabreTools.Models.Quantum.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new Quantum();
|
||||
var extractable = new Quantum(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new Quantum();
|
||||
var extractable = new Quantum(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new Quantum();
|
||||
var extractable = new Quantum(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class RARTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.RAR wrapper
|
||||
= new(new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new RAR();
|
||||
var extractable = new RAR(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new RAR();
|
||||
var extractable = new RAR(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new RAR();
|
||||
var extractable = new RAR(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class SGATests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.SGA wrapper
|
||||
= new(new SabreTools.Models.SGA.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new SGA();
|
||||
var extractable = new SGA(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new SGA();
|
||||
var extractable = new SGA(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new SGA();
|
||||
var extractable = new SGA(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class SevenZipTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.SevenZip wrapper
|
||||
= new(new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new SevenZip();
|
||||
var extractable = new SevenZip(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new SevenZip();
|
||||
var extractable = new SevenZip(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new SevenZip();
|
||||
var extractable = new SevenZip(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class TapeArchiveTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.TapeArchive wrapper
|
||||
= new(new SabreTools.Models.TAR.Archive(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new TapeArchive();
|
||||
var extractable = new TapeArchive(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new TapeArchive();
|
||||
var extractable = new TapeArchive(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new TapeArchive();
|
||||
var extractable = new TapeArchive(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class VBSPTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.VBSP wrapper
|
||||
= new(new SabreTools.Models.BSP.VbspFile(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new VBSP();
|
||||
var extractable = new VBSP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new VBSP();
|
||||
var extractable = new VBSP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new VBSP();
|
||||
var extractable = new VBSP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class VPKTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.VPK wrapper
|
||||
= new(new SabreTools.Models.VPK.File(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new VPK();
|
||||
var extractable = new VPK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new VPK();
|
||||
var extractable = new VPK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new VPK();
|
||||
var extractable = new VPK(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class WAD3Tests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.WAD3 wrapper
|
||||
= new(new SabreTools.Models.WAD3.File(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new WAD3();
|
||||
var extractable = new WAD3(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new WAD3();
|
||||
var extractable = new WAD3(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new WAD3();
|
||||
var extractable = new WAD3(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class XZPTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.XZP wrapper
|
||||
= new(new SabreTools.Models.XZP.File(), new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new XZP();
|
||||
var extractable = new XZP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new XZP();
|
||||
var extractable = new XZP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new XZP();
|
||||
var extractable = new XZP(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
@@ -6,12 +6,15 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
{
|
||||
public class XZTests
|
||||
{
|
||||
private static readonly SabreTools.Serialization.Wrappers.XZ wrapper
|
||||
= new(new MemoryStream());
|
||||
|
||||
[Fact]
|
||||
public void ExtractFile_EmptyString_False()
|
||||
{
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new XZ();
|
||||
var extractable = new XZ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -23,7 +26,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = null;
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new XZ();
|
||||
var extractable = new XZ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
@@ -35,7 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
|
||||
Stream? stream = new MemoryStream();
|
||||
string file = string.Empty;
|
||||
string outDir = string.Empty;
|
||||
var extractable = new XZ();
|
||||
var extractable = new XZ(wrapper);
|
||||
|
||||
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
|
||||
Assert.False(actual);
|
||||
|
||||
Reference in New Issue
Block a user