3030
3131namespace Monai . Deploy . InformaticsGateway . PlugIns . RemoteAppExecution . Test
3232{
33- public class ExternalAppOutgoingTest
33+ public class DicomDeidentifierTest
3434 {
35- private readonly Mock < ILogger < ExternalAppOutgoing > > _logger ;
35+ private readonly Mock < ILogger < DicomDeidentifier > > _logger ;
3636 private readonly Mock < IServiceScopeFactory > _serviceScopeFactory ;
3737 private readonly ServiceCollection _serviceCollection ;
3838 private readonly Mock < IRemoteAppExecutionRepository > _repository ;
3939 private readonly IOptions < PlugInConfiguration > _options ;
4040 private readonly Mock < IServiceScope > _serviceScope ;
4141 private readonly ServiceProvider _serviceProvider ;
4242
43- public ExternalAppOutgoingTest ( )
43+ public DicomDeidentifierTest ( )
4444 {
45- _logger = new Mock < ILogger < ExternalAppOutgoing > > ( ) ;
45+ _logger = new Mock < ILogger < DicomDeidentifier > > ( ) ;
4646 _serviceScopeFactory = new Mock < IServiceScopeFactory > ( ) ;
4747 _repository = new Mock < IRemoteAppExecutionRepository > ( ) ;
4848 _serviceScope = new Mock < IServiceScope > ( ) ;
@@ -61,15 +61,15 @@ public ExternalAppOutgoingTest()
6161 }
6262
6363 [ Fact ]
64- public void GivenExternalAppOutgoing_TestConstructors ( )
64+ public void GivenDicomDeidentifier_TestConstructors ( )
6565 {
66- Assert . Throws < ArgumentNullException > ( ( ) => new ExternalAppOutgoing ( null , null , null ) ) ;
67- Assert . Throws < ArgumentNullException > ( ( ) => new ExternalAppOutgoing ( _logger . Object , null , null ) ) ;
68- Assert . Throws < ArgumentNullException > ( ( ) => new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , null ) ) ;
69- Assert . Throws < ArgumentNullException > ( ( ) => new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , _options ) ) ;
66+ Assert . Throws < ArgumentNullException > ( ( ) => new DicomDeidentifier ( null , null , null ) ) ;
67+ Assert . Throws < ArgumentNullException > ( ( ) => new DicomDeidentifier ( _logger . Object , null , null ) ) ;
68+ Assert . Throws < ArgumentNullException > ( ( ) => new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , null ) ) ;
69+ Assert . Throws < ArgumentNullException > ( ( ) => new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , _options ) ) ;
7070
7171 _options . Value . RemoteAppConfigurations . Add ( SR . ConfigKey_ReplaceTags , "tag1, tag2" ) ;
72- var app = new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
72+ var app = new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
7373
7474 Assert . Equal ( app . Name , app . GetType ( ) . GetCustomAttribute < PlugInNameAttribute > ( ) ! . Name ) ;
7575 }
@@ -78,7 +78,7 @@ public void GivenExternalAppOutgoing_TestConstructors()
7878 public async Task GivenEmptyReplaceTags_WhenExecuteIsCalledWithoutExistingRecords_ExpectAsync ( )
7979 {
8080 _options . Value . RemoteAppConfigurations . Add ( SR . ConfigKey_ReplaceTags , string . Empty ) ;
81- var app = new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
81+ var app = new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
8282
8383 var studyInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
8484 var seriesInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
@@ -106,7 +106,7 @@ public async Task GivenReplaceTags_WhenExecuteIsCalledWithoutExistingRecords_Exp
106106 {
107107 _options . Value . RemoteAppConfigurations . Add ( SR . ConfigKey_ReplaceTags , "StudyInstanceUID,AccessionNumber,PatientID,PatientName" ) ;
108108
109- var app = new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
109+ var app = new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
110110
111111 var studyInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
112112 var seriesInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
@@ -139,7 +139,7 @@ public async Task GivenReplaceTags_WhenExecuteIsCalledWithoutExistingRecords_Exp
139139 public async Task GivenExistingRecordWithSameStudy_WhenExecuteIsCalled_ExpectAsync ( )
140140 {
141141 _options . Value . RemoteAppConfigurations . Add ( SR . ConfigKey_ReplaceTags , string . Empty ) ;
142- var app = new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
142+ var app = new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
143143
144144 var studyInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
145145 var seriesInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
@@ -175,7 +175,7 @@ public async Task GivenExistingRecordWithSameStudy_WhenExecuteIsCalled_ExpectAsy
175175 public async Task GivenExistingRecordWithSameSeries_WhenExecuteIsCalled_ExpectAsync ( )
176176 {
177177 _options . Value . RemoteAppConfigurations . Add ( SR . ConfigKey_ReplaceTags , string . Empty ) ;
178- var app = new ExternalAppOutgoing ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
178+ var app = new DicomDeidentifier ( _logger . Object , _serviceScopeFactory . Object , _options ) ;
179179
180180 var studyInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
181181 var seriesInstanceUid = DicomUIDGenerator . GenerateDerivedFromUUID ( ) . UID ;
0 commit comments