Fix all broken tests from previous update

This commit is contained in:
Matt Nadareski
2025-09-02 20:21:53 -04:00
parent 77ad6e791a
commit cc826fdc60
7 changed files with 23 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ namespace BinaryObjectScanner.Test
WrapperType.BZip2,
WrapperType.CFB,
//WrapperType.CIA,
//WrapperType.Executable,
WrapperType.Executable,
WrapperType.GCF,
WrapperType.GZip,
WrapperType.InstallShieldArchiveV3,

View File

@@ -26,7 +26,8 @@ namespace BinaryObjectScanner.Test.FileType
string outDir = string.Empty;
var extractable = new InstallShieldCAB();
Assert.Throws<ArgumentException>(() => extractable.Extract(stream, file, outDir, includeDebug: false));
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
[Fact]
@@ -37,7 +38,8 @@ namespace BinaryObjectScanner.Test.FileType
string outDir = string.Empty;
var extractable = new InstallShieldCAB();
Assert.Throws<ArgumentException>(() => extractable.Extract(stream, file, outDir, includeDebug: false));
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
Assert.False(actual);
}
}
}

View File

@@ -30,7 +30,7 @@ namespace BinaryObjectScanner.Test.FileType
}
[Fact]
public void ExtractStream_Empty_True()
public void ExtractStream_Empty_False()
{
Stream? stream = new MemoryStream();
string file = string.Empty;
@@ -38,9 +38,7 @@ namespace BinaryObjectScanner.Test.FileType
var extractable = new TapeArchive();
bool actual = extractable.Extract(stream, file, outDir, includeDebug: false);
// Unexpected result -- Empty file recognized as valid in SharpCompress
Assert.True(actual);
Assert.False(actual);
}
}
}