mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Check if test file exists before proceeding with test.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Core;
|
||||
@@ -30,7 +31,16 @@ namespace Aaru.Tests.Filesystems
|
||||
{
|
||||
foreach(FileSystemTest test in Tests)
|
||||
{
|
||||
string testFile = test.TestFile;
|
||||
string testFile = test.TestFile;
|
||||
|
||||
bool exists = File.Exists(testFile);
|
||||
Assert.True(exists, $"{testFile} not found");
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
// It arrives here...
|
||||
if(!exists)
|
||||
continue;
|
||||
|
||||
var filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(testFile);
|
||||
|
||||
@@ -97,7 +107,16 @@ namespace Aaru.Tests.Filesystems
|
||||
{
|
||||
foreach(FileSystemTest test in Tests)
|
||||
{
|
||||
string testFile = test.TestFile;
|
||||
string testFile = test.TestFile;
|
||||
|
||||
bool exists = File.Exists(testFile);
|
||||
Assert.True(exists, $"{testFile} not found");
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
// It arrives here...
|
||||
if(!exists)
|
||||
continue;
|
||||
|
||||
var filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(testFile);
|
||||
|
||||
@@ -129,6 +148,14 @@ namespace Aaru.Tests.Filesystems
|
||||
bool found = false;
|
||||
var partition = new Partition();
|
||||
|
||||
bool exists = File.Exists(testFile);
|
||||
Assert.True(exists, $"{testFile} not found");
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
// It arrives here...
|
||||
if(!exists)
|
||||
continue;
|
||||
|
||||
var filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(testFile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user