Skip to content

Commit

Permalink
move test rejectors out of src
Browse files Browse the repository at this point in the history
  • Loading branch information
rkm committed Dec 11, 2024
1 parent d5bf0be commit 759e12e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 29 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using SmiServices.UnitTests.Common;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Tests.Common;

Expand Down Expand Up @@ -159,5 +160,14 @@ public void Test_FromCataloguesExtractionRequestFulfiller_NoFilterExtraction(Dat
Assert.That(matching, Has.Length.EqualTo(1));
Assert.That(matching[0].Accepted, Has.Count.EqualTo(expected));
}

private class RejectAll : IRejector
{
public bool Reject(IDataRecord row, [NotNullWhen(true)] out string? reason)
{
reason = "Rejector is " + nameof(RejectAll);
return true;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
using SmiServices.IntegrationTests.Common;
using SmiServices.UnitTests.Microservices.DicomRelationalMapper;
using SmiServices.UnitTests.TestCommon;
using System.Diagnostics.CodeAnalysis;

namespace SmiServices.IntegrationTests.Microservices.DicomRelationalMapper
{
Expand Down Expand Up @@ -189,7 +190,7 @@ public void IntegrationTest_Rejector(DatabaseType databaseType, Type? rejector)
_globals.DicomRelationalMapperOptions.QoSPrefetchCount = 5000;
_globals.DicomRelationalMapperOptions.DatabaseNamerType = typeof(GuidDatabaseNamer).FullName;

_globals.CohortExtractorOptions!.RejectorType = rejector?.FullName;
_globals.CohortExtractorOptions!.RejectorType = rejector?.Name;

_globals.FileSystemOptions!.DicomSearchPattern = "*";

Expand Down Expand Up @@ -626,5 +627,14 @@ public override void ClearCache() { }
return null;
}
}

private class RejectAll : IRejector
{
public bool Reject(IDataRecord row, [NotNullWhen(true)] out string? reason)
{
reason = "Rejector is " + nameof(RejectAll);
return true;
}
}
}
}

0 comments on commit 759e12e

Please sign in to comment.