Skip to content

Commit

Permalink
Improvement test
Browse files Browse the repository at this point in the history
  • Loading branch information
AigioL committed May 16, 2024
1 parent 4078960 commit ce93820
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions SevenZip.Tests/FileCheckerTests.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
namespace SevenZip.Tests
namespace SevenZip.Tests
{
using System.Collections.Generic;
using System.IO;

using SevenZip;

using NUnit.Framework;
using System;

/// <summary>
/// Test data to use for CheckFileSignatureTest.
Expand All @@ -27,7 +28,7 @@ public FileCheckerTestData(string testDataFilePath, InArchiveFormat expectedForm
/// Path to archive file to test against.
/// </summary>
public string TestDataFilePath { get; }

public override string ToString()
{
// Used to get useful test results.
Expand Down Expand Up @@ -85,11 +86,11 @@ public void SetUp()
// Ensures we're in the correct working directory (for test data files).
Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory);
}

[TestCaseSource(nameof(TestData))]
public void CheckFileSignatureTest(FileCheckerTestData data)
{
if (!File.Exists(data.TestDataFilePath))
if (!File.Exists(Path.Combine(AppContext.BaseDirectory, data.TestDataFilePath)))
{
Assert.Ignore("No test data found for this format.");
}
Expand Down
4 changes: 2 additions & 2 deletions SevenZip.Tests/LibraryManagerTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SevenZip.Tests
namespace SevenZip.Tests
{
using NUnit.Framework;

Expand All @@ -14,7 +14,7 @@ public void SetNonExistant7zDllLocationTest()
[Test]
public void CurrentLibraryFeaturesTest()
{
var features = SevenZipBase.CurrentLibraryFeatures;
var /*features = SevenZipBase.CurrentLibraryFeatures;*/

// Exercising more code paths...
features = SevenZipLibraryManager.CurrentLibraryFeatures;
Expand Down
2 changes: 1 addition & 1 deletion SevenZip.Tests/SevenZipExtractorAsynchronousTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SevenZip.Tests
namespace SevenZip.Tests
{
using System.IO;
using System.Threading;
Expand Down
2 changes: 1 addition & 1 deletion SevenZip.Tests/SevenZipExtractorTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SevenZip.Tests
namespace SevenZip.Tests
{
using System;
using System.Collections.Generic;
Expand Down

0 comments on commit ce93820

Please sign in to comment.