diff --git a/BinaryObjectScanner.Test/FileType/AACSMediaKeyBlockTests.cs b/BinaryObjectScanner.Test/FileType/AACSMediaKeyBlockTests.cs index 2433eab2..69f11674 100644 --- a/BinaryObjectScanner.Test/FileType/AACSMediaKeyBlockTests.cs +++ b/BinaryObjectScanner.Test/FileType/AACSMediaKeyBlockTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class AACSMediaKeyBlockTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new AACSMediaKeyBlock(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/BDPlusSVMTests.cs b/BinaryObjectScanner.Test/FileType/BDPlusSVMTests.cs index 0bc35a49..6b537fcf 100644 --- a/BinaryObjectScanner.Test/FileType/BDPlusSVMTests.cs +++ b/BinaryObjectScanner.Test/FileType/BDPlusSVMTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class BDPlusSVMTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new BDPlusSVM(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/BFPKTests.cs b/BinaryObjectScanner.Test/FileType/BFPKTests.cs index 9414e4e1..bf86df65 100644 --- a/BinaryObjectScanner.Test/FileType/BFPKTests.cs +++ b/BinaryObjectScanner.Test/FileType/BFPKTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class BFPKTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; @@ -40,5 +40,29 @@ namespace BinaryObjectScanner.Test.FileType bool actual = extractable.Extract(stream, file, outDir, includeDebug: false); Assert.False(actual); } + + [Fact] + public void ExtractAll_EmptyModel_False() + { + var model = new SabreTools.Models.BFPK.Archive(); + var data = new MemoryStream(); + var item = new SabreTools.Serialization.Wrappers.BFPK(model, data); + string outputDirectory = string.Empty; + + bool actual = BFPK.ExtractAll(item, outputDirectory); + Assert.False(actual); + } + + [Fact] + public void ExtractFile_EmptyModel_False() + { + var model = new SabreTools.Models.BFPK.Archive(); + var data = new MemoryStream(); + var item = new SabreTools.Serialization.Wrappers.BFPK(model, data); + string outputDirectory = string.Empty; + + bool actual = BFPK.ExtractFile(item, 0, outputDirectory); + Assert.False(actual); + } } } diff --git a/BinaryObjectScanner.Test/FileType/BSPTests.cs b/BinaryObjectScanner.Test/FileType/BSPTests.cs index 01ef96eb..40b05167 100644 --- a/BinaryObjectScanner.Test/FileType/BSPTests.cs +++ b/BinaryObjectScanner.Test/FileType/BSPTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class BSPTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/BZip2Tests.cs b/BinaryObjectScanner.Test/FileType/BZip2Tests.cs index 017a753a..86182c9a 100644 --- a/BinaryObjectScanner.Test/FileType/BZip2Tests.cs +++ b/BinaryObjectScanner.Test/FileType/BZip2Tests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class BZip2Tests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/CFBTests.cs b/BinaryObjectScanner.Test/FileType/CFBTests.cs index b10ee142..be5dea04 100644 --- a/BinaryObjectScanner.Test/FileType/CFBTests.cs +++ b/BinaryObjectScanner.Test/FileType/CFBTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class CFBTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/ExecutableTests.cs b/BinaryObjectScanner.Test/FileType/ExecutableTests.cs index a74957fa..662694ef 100644 --- a/BinaryObjectScanner.Test/FileType/ExecutableTests.cs +++ b/BinaryObjectScanner.Test/FileType/ExecutableTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class ExecutableTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new Executable(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/GCFTests.cs b/BinaryObjectScanner.Test/FileType/GCFTests.cs index 66aef36d..ea9be85b 100644 --- a/BinaryObjectScanner.Test/FileType/GCFTests.cs +++ b/BinaryObjectScanner.Test/FileType/GCFTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class GCFTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/GZIPTests.cs b/BinaryObjectScanner.Test/FileType/GZIPTests.cs index b91a0100..4fafa72c 100644 --- a/BinaryObjectScanner.Test/FileType/GZIPTests.cs +++ b/BinaryObjectScanner.Test/FileType/GZIPTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class GZIPTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/InstallShieldArchiveV3Tests.cs b/BinaryObjectScanner.Test/FileType/InstallShieldArchiveV3Tests.cs index 53ce85c6..769ee998 100644 --- a/BinaryObjectScanner.Test/FileType/InstallShieldArchiveV3Tests.cs +++ b/BinaryObjectScanner.Test/FileType/InstallShieldArchiveV3Tests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class InstallShieldArchiveV3Tests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/InstallShieldCABTests.cs b/BinaryObjectScanner.Test/FileType/InstallShieldCABTests.cs index 36205506..91f66268 100644 --- a/BinaryObjectScanner.Test/FileType/InstallShieldCABTests.cs +++ b/BinaryObjectScanner.Test/FileType/InstallShieldCABTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class InstallShieldCABTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/LDSCRYPTTests.cs b/BinaryObjectScanner.Test/FileType/LDSCRYPTTests.cs index 690b5e4e..93e59b17 100644 --- a/BinaryObjectScanner.Test/FileType/LDSCRYPTTests.cs +++ b/BinaryObjectScanner.Test/FileType/LDSCRYPTTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class LDSCRYPTTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new LDSCRYPT(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/MPQTests.cs b/BinaryObjectScanner.Test/FileType/MPQTests.cs index 5e2688aa..6f2dd0d9 100644 --- a/BinaryObjectScanner.Test/FileType/MPQTests.cs +++ b/BinaryObjectScanner.Test/FileType/MPQTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class MPQTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/MicrosoftCABTests.cs b/BinaryObjectScanner.Test/FileType/MicrosoftCABTests.cs index ab77c8c0..965d7c9c 100644 --- a/BinaryObjectScanner.Test/FileType/MicrosoftCABTests.cs +++ b/BinaryObjectScanner.Test/FileType/MicrosoftCABTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class MicrosoftCABTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/MicrosoftLZTests.cs b/BinaryObjectScanner.Test/FileType/MicrosoftLZTests.cs index 7c5a9477..4379246e 100644 --- a/BinaryObjectScanner.Test/FileType/MicrosoftLZTests.cs +++ b/BinaryObjectScanner.Test/FileType/MicrosoftLZTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class MicrosoftLZTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/PAKTests.cs b/BinaryObjectScanner.Test/FileType/PAKTests.cs index ab3eb659..fa02effa 100644 --- a/BinaryObjectScanner.Test/FileType/PAKTests.cs +++ b/BinaryObjectScanner.Test/FileType/PAKTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class PAKTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/PFFTests.cs b/BinaryObjectScanner.Test/FileType/PFFTests.cs index bfe54362..408a20fb 100644 --- a/BinaryObjectScanner.Test/FileType/PFFTests.cs +++ b/BinaryObjectScanner.Test/FileType/PFFTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class PFFTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/PKZIPTests.cs b/BinaryObjectScanner.Test/FileType/PKZIPTests.cs index 71984088..6b3454ed 100644 --- a/BinaryObjectScanner.Test/FileType/PKZIPTests.cs +++ b/BinaryObjectScanner.Test/FileType/PKZIPTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class PKZIPTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; @@ -17,6 +17,17 @@ namespace BinaryObjectScanner.Test.FileType Assert.False(actual); } + [Fact] + public void ExtractFile_LookForHeader_EmptyString_False() + { + string file = string.Empty; + string outDir = string.Empty; + var extractable = new PKZIP(); + + bool actual = extractable.Extract(file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } + [Fact] public void ExtractStream_Null_False() { @@ -29,6 +40,18 @@ namespace BinaryObjectScanner.Test.FileType Assert.False(actual); } + [Fact] + public void ExtractStream_LookForHeader_Null_False() + { + Stream? stream = null; + string file = string.Empty; + string outDir = string.Empty; + var extractable = new PKZIP(); + + bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } + [Fact] public void ExtractStream_Empty_False() { @@ -40,5 +63,17 @@ namespace BinaryObjectScanner.Test.FileType bool actual = extractable.Extract(stream, file, outDir, includeDebug: false); Assert.False(actual); } + + [Fact] + public void ExtractStream_LookForHeader_Empty_False() + { + Stream? stream = new MemoryStream(); + string file = string.Empty; + string outDir = string.Empty; + var extractable = new PKZIP(); + + bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } } } diff --git a/BinaryObjectScanner.Test/FileType/PLJTests.cs b/BinaryObjectScanner.Test/FileType/PLJTests.cs index 95231dc0..b7d07cfe 100644 --- a/BinaryObjectScanner.Test/FileType/PLJTests.cs +++ b/BinaryObjectScanner.Test/FileType/PLJTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class PLJTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new PLJ(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/QuantumTests.cs b/BinaryObjectScanner.Test/FileType/QuantumTests.cs index 7ebd7c03..3a20c349 100644 --- a/BinaryObjectScanner.Test/FileType/QuantumTests.cs +++ b/BinaryObjectScanner.Test/FileType/QuantumTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class QuantumTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; @@ -40,5 +40,29 @@ namespace BinaryObjectScanner.Test.FileType bool actual = extractable.Extract(stream, file, outDir, includeDebug: false); Assert.False(actual); } + + [Fact] + public void ExtractAll_EmptyModel_False() + { + var model = new SabreTools.Models.Quantum.Archive(); + var data = new MemoryStream(); + var item = new SabreTools.Serialization.Wrappers.Quantum(model, data); + string outputDirectory = string.Empty; + + bool actual = Quantum.ExtractAll(item, outputDirectory); + Assert.False(actual); + } + + [Fact] + public void ExtractFile_EmptyModel_False() + { + var model = new SabreTools.Models.Quantum.Archive(); + var data = new MemoryStream(); + var item = new SabreTools.Serialization.Wrappers.Quantum(model, data); + string outputDirectory = string.Empty; + + bool actual = Quantum.ExtractFile(item, 0, outputDirectory); + Assert.False(actual); + } } } diff --git a/BinaryObjectScanner.Test/FileType/RARTests.cs b/BinaryObjectScanner.Test/FileType/RARTests.cs index 2b8891aa..3473547f 100644 --- a/BinaryObjectScanner.Test/FileType/RARTests.cs +++ b/BinaryObjectScanner.Test/FileType/RARTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class RARTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; @@ -17,6 +17,17 @@ namespace BinaryObjectScanner.Test.FileType Assert.False(actual); } + [Fact] + public void ExtractFile_LookForHeader_EmptyString_False() + { + string file = string.Empty; + string outDir = string.Empty; + var extractable = new RAR(); + + bool actual = extractable.Extract(file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } + [Fact] public void ExtractStream_Null_False() { @@ -29,6 +40,18 @@ namespace BinaryObjectScanner.Test.FileType Assert.False(actual); } + [Fact] + public void ExtractStream_LookForHeader_Null_False() + { + Stream? stream = null; + string file = string.Empty; + string outDir = string.Empty; + var extractable = new RAR(); + + bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } + [Fact] public void ExtractStream_Empty_False() { @@ -40,5 +63,17 @@ namespace BinaryObjectScanner.Test.FileType bool actual = extractable.Extract(stream, file, outDir, includeDebug: false); Assert.False(actual); } + + [Fact] + public void ExtractStream_LookForHeader_Empty_False() + { + Stream? stream = new MemoryStream(); + string file = string.Empty; + string outDir = string.Empty; + var extractable = new RAR(); + + bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } } } diff --git a/BinaryObjectScanner.Test/FileType/RealArcadeInstallerTests.cs b/BinaryObjectScanner.Test/FileType/RealArcadeInstallerTests.cs index 4a9c698f..91a7d192 100644 --- a/BinaryObjectScanner.Test/FileType/RealArcadeInstallerTests.cs +++ b/BinaryObjectScanner.Test/FileType/RealArcadeInstallerTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class RealArcadeInstallerTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new RealArcadeInstaller(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/RealArcadeMezzanineTests.cs b/BinaryObjectScanner.Test/FileType/RealArcadeMezzanineTests.cs index 1838f919..3e0083e2 100644 --- a/BinaryObjectScanner.Test/FileType/RealArcadeMezzanineTests.cs +++ b/BinaryObjectScanner.Test/FileType/RealArcadeMezzanineTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class RealArcadeMezzanineTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new RealArcadeMezzanine(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/SFFSTests.cs b/BinaryObjectScanner.Test/FileType/SFFSTests.cs index d399a9f4..81fd81e9 100644 --- a/BinaryObjectScanner.Test/FileType/SFFSTests.cs +++ b/BinaryObjectScanner.Test/FileType/SFFSTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class SFFSTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new SFFS(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; @@ -28,7 +28,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/SGATests.cs b/BinaryObjectScanner.Test/FileType/SGATests.cs index 543ebb26..8653cb3b 100644 --- a/BinaryObjectScanner.Test/FileType/SGATests.cs +++ b/BinaryObjectScanner.Test/FileType/SGATests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class SGATests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; @@ -40,5 +40,29 @@ namespace BinaryObjectScanner.Test.FileType bool actual = extractable.Extract(stream, file, outDir, includeDebug: false); Assert.False(actual); } + + [Fact] + public void ExtractAll_EmptyModel_False() + { + var model = new SabreTools.Models.SGA.Archive(); + var data = new MemoryStream(); + var item = new SabreTools.Serialization.Wrappers.SGA(model, data); + string outputDirectory = string.Empty; + + bool actual = SGA.ExtractAll(item, outputDirectory); + Assert.False(actual); + } + + [Fact] + public void ExtractFile_EmptyModel_False() + { + var model = new SabreTools.Models.SGA.Archive(); + var data = new MemoryStream(); + var item = new SabreTools.Serialization.Wrappers.SGA(model, data); + string outputDirectory = string.Empty; + + bool actual = SGA.ExtractFile(item, 0, outputDirectory); + Assert.False(actual); + } } } diff --git a/BinaryObjectScanner.Test/FileType/SevenZipTests.cs b/BinaryObjectScanner.Test/FileType/SevenZipTests.cs index 419fbccf..acaec87d 100644 --- a/BinaryObjectScanner.Test/FileType/SevenZipTests.cs +++ b/BinaryObjectScanner.Test/FileType/SevenZipTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class SevenZipTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; @@ -17,6 +17,17 @@ namespace BinaryObjectScanner.Test.FileType Assert.False(actual); } + [Fact] + public void ExtractFile_LookForHeader_EmptyString_False() + { + string file = string.Empty; + string outDir = string.Empty; + var extractable = new SevenZip(); + + bool actual = extractable.Extract(file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } + [Fact] public void ExtractStream_Null_False() { @@ -29,6 +40,18 @@ namespace BinaryObjectScanner.Test.FileType Assert.False(actual); } + [Fact] + public void ExtractStream_LookForHeader_Null_False() + { + Stream? stream = null; + string file = string.Empty; + string outDir = string.Empty; + var extractable = new SevenZip(); + + bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } + [Fact] public void ExtractStream_Empty_False() { @@ -40,5 +63,17 @@ namespace BinaryObjectScanner.Test.FileType bool actual = extractable.Extract(stream, file, outDir, includeDebug: false); Assert.False(actual); } + + [Fact] + public void ExtractStream_LookForHeader_Empty_False() + { + Stream? stream = new MemoryStream(); + string file = string.Empty; + string outDir = string.Empty; + var extractable = new SevenZip(); + + bool actual = extractable.Extract(stream, file, outDir, lookForHeader: true, includeDebug: false); + Assert.False(actual); + } } } diff --git a/BinaryObjectScanner.Test/FileType/TapeArchiveTests.cs b/BinaryObjectScanner.Test/FileType/TapeArchiveTests.cs index be57fe05..96f3ff22 100644 --- a/BinaryObjectScanner.Test/FileType/TapeArchiveTests.cs +++ b/BinaryObjectScanner.Test/FileType/TapeArchiveTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class TapeArchiveTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/TextfileTests.cs b/BinaryObjectScanner.Test/FileType/TextfileTests.cs index 8a24a5ff..764d6a8f 100644 --- a/BinaryObjectScanner.Test/FileType/TextfileTests.cs +++ b/BinaryObjectScanner.Test/FileType/TextfileTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class TextfileTests { [Fact] - public void DetectFileTest() + public void DetectFile_EmptyString_Null() { string file = string.Empty; var detectable = new Textfile(); @@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Test.FileType } [Fact] - public void DetectStream() + public void DetectStream_EmptyStream_Null() { Stream? stream = new MemoryStream(); string file = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/VBSPTests.cs b/BinaryObjectScanner.Test/FileType/VBSPTests.cs index 9f3d71f3..ef7bba00 100644 --- a/BinaryObjectScanner.Test/FileType/VBSPTests.cs +++ b/BinaryObjectScanner.Test/FileType/VBSPTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class VBSPTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/VPKTests.cs b/BinaryObjectScanner.Test/FileType/VPKTests.cs index d25ed582..a797bfec 100644 --- a/BinaryObjectScanner.Test/FileType/VPKTests.cs +++ b/BinaryObjectScanner.Test/FileType/VPKTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class VPKTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/WAD3Tests.cs b/BinaryObjectScanner.Test/FileType/WAD3Tests.cs index 9826adfc..de5b1147 100644 --- a/BinaryObjectScanner.Test/FileType/WAD3Tests.cs +++ b/BinaryObjectScanner.Test/FileType/WAD3Tests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class WAD3Tests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/XZPTests.cs b/BinaryObjectScanner.Test/FileType/XZPTests.cs index 4f732f9d..ec36029d 100644 --- a/BinaryObjectScanner.Test/FileType/XZPTests.cs +++ b/BinaryObjectScanner.Test/FileType/XZPTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class XZPTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty; diff --git a/BinaryObjectScanner.Test/FileType/XZTests.cs b/BinaryObjectScanner.Test/FileType/XZTests.cs index c119e20c..de083c08 100644 --- a/BinaryObjectScanner.Test/FileType/XZTests.cs +++ b/BinaryObjectScanner.Test/FileType/XZTests.cs @@ -7,7 +7,7 @@ namespace BinaryObjectScanner.Test.FileType public class XZTests { [Fact] - public void ExtractFileTest() + public void ExtractFile_EmptyString_False() { string file = string.Empty; string outDir = string.Empty;