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:
5
.idea/.idea.Aaru/.idea/indexLayout.xml
generated
5
.idea/.idea.Aaru/.idea/indexLayout.xml
generated
@@ -5,9 +5,4 @@
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
<component name="WorkspaceUserModelUpdater">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Core;
|
||||
@@ -31,6 +32,15 @@ namespace Aaru.Tests.Filesystems
|
||||
foreach(FileSystemTest test in Tests)
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -98,6 +108,15 @@ namespace Aaru.Tests.Filesystems
|
||||
foreach(FileSystemTest test in Tests)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Aaru.Checksums;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
@@ -23,6 +24,15 @@ namespace Aaru.Tests.Images
|
||||
foreach(BlockImageTestExpected test in Tests)
|
||||
{
|
||||
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 filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
@@ -59,6 +69,15 @@ namespace Aaru.Tests.Images
|
||||
foreach(BlockImageTestExpected test in Tests)
|
||||
{
|
||||
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 filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Aaru.Checksums;
|
||||
@@ -27,6 +28,15 @@ namespace Aaru.Tests.Images
|
||||
foreach(OpticalImageTestExpected test in Tests)
|
||||
{
|
||||
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 filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
@@ -98,6 +108,15 @@ namespace Aaru.Tests.Images
|
||||
Parallel.For(0L, Tests.Length, (i, state) =>
|
||||
{
|
||||
string testFile = Tests[i].TestFile;
|
||||
|
||||
bool exists = File.Exists(testFile);
|
||||
Assert.True(exists, $"{testFile} not found");
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
// It arrives here...
|
||||
if(!exists)
|
||||
return;
|
||||
|
||||
var filtersList = new FiltersList();
|
||||
IFilter filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Aaru.Checksums;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
@@ -25,6 +26,15 @@ namespace Aaru.Tests.Images
|
||||
foreach(TapeImageTestExpected test in Tests)
|
||||
{
|
||||
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 filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
@@ -64,6 +74,15 @@ namespace Aaru.Tests.Images
|
||||
foreach(TapeImageTestExpected test in Tests)
|
||||
{
|
||||
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 filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
@@ -100,6 +119,15 @@ namespace Aaru.Tests.Images
|
||||
foreach(TapeImageTestExpected test in Tests)
|
||||
{
|
||||
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 filter = filtersList.GetFilter(testFile);
|
||||
filter.Open(testFile);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Core;
|
||||
@@ -21,6 +22,14 @@ namespace Aaru.Tests.Partitions
|
||||
string testFile = test.TestFile;
|
||||
Environment.CurrentDirectory = DataFolder;
|
||||
|
||||
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