-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,642 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Rdmp.Dicom.Tests/Integration/FoDicomAnonymiserStandaloneTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using NUnit.Framework; | ||
using Rdmp.Dicom.Extraction.FoDicomBased; | ||
using Rdmp.Dicom.Extraction.FoDicomBased.DirectoryDecisions; | ||
using ReusableLibraryCode.Progress; | ||
using System.IO; | ||
|
||
namespace Rdmp.Dicom.Tests.Integration | ||
{ | ||
public class FoDicomAnonymiserStandaloneTests | ||
{ | ||
[Test] | ||
public void TestAnonymiseAFile() | ||
{ | ||
var anon = new FoDicomAnonymiser(); | ||
|
||
var inPath = new DirectoryInfo(Path.Combine(TestContext.CurrentContext.WorkDirectory, "in")); | ||
var outPath = new DirectoryInfo(Path.Combine(TestContext.CurrentContext.WorkDirectory, "out")); | ||
|
||
if (inPath.Exists) | ||
inPath.Delete(true); | ||
inPath.Create(); | ||
|
||
if (outPath.Exists) | ||
outPath.Delete(true); | ||
outPath.Create(); | ||
|
||
// put a dicom file in the in dir | ||
var testFile = new FileInfo(Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestData/IM-0001-0013.dcm")); | ||
testFile.CopyTo(Path.Combine(inPath.FullName, "blah.dcm"),true); | ||
|
||
anon.Initialize(1, outPath,null /*no UID mapping*/); | ||
|
||
var putter = new PutInRoot(); | ||
|
||
anon.ProcessFile( | ||
new AmbiguousFilePath(inPath.FullName, "blah.dcm"), | ||
new ThrowImmediatelyDataLoadEventListener(), | ||
new ZipPool(), | ||
"fffff", | ||
putter, null); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.