File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
src/InformaticsGateway/Test Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
- <!--
1
+ <!--
2
2
~ Copyright 2021-2023 MONAI Consortium
3
3
~
4
4
~ Licensed under the Apache License, Version 2.0 (the "License");
28
28
<Compile Include =" ..\..\Shared\Test\InstanceGenerator.cs" Link =" Shared\InstanceGenerator.cs" />
29
29
<Compile Include =" ..\..\Shared\Test\TestStorageInfo.cs" Link =" Shared\TestStorageInfo.cs" />
30
30
<Compile Include =" ..\..\Shared\Test\VerifyLogExtension.cs" Link =" Shared\VerifyLogExtension.cs" />
31
+ <Content Include =" xunit.runner.json" CopyToOutputDirectory =" PreserveNewest" />
31
32
</ItemGroup >
32
33
33
34
<ItemGroup >
Original file line number Diff line number Diff line change 19
19
using System . IO . Abstractions ;
20
20
using System . Linq ;
21
21
using System . Reflection ;
22
+ using System . Text . Json ;
22
23
using Microsoft . Extensions . Logging ;
23
24
using Monai . Deploy . InformaticsGateway . Api . PlugIns ;
24
25
using Monai . Deploy . InformaticsGateway . Common ;
28
29
using Monai . Deploy . InformaticsGateway . Test . PlugIns ;
29
30
using Moq ;
30
31
using Xunit ;
32
+ using Xunit . Abstractions ;
31
33
32
34
namespace Monai . Deploy . InformaticsGateway . Test . Services . Common
33
35
{
34
36
public class OutputDataPlugInEngineFactoryTest
35
37
{
36
38
private readonly Mock < ILogger < OutputDataPlugInEngineFactory > > _logger ;
37
39
private readonly FileSystem _fileSystem ;
40
+ private readonly ITestOutputHelper _output ;
38
41
39
- public OutputDataPlugInEngineFactoryTest ( )
42
+ public OutputDataPlugInEngineFactoryTest ( ITestOutputHelper output )
40
43
{
41
44
_logger = new Mock < ILogger < OutputDataPlugInEngineFactory > > ( ) ;
42
45
_fileSystem = new FileSystem ( ) ;
43
-
46
+ _output = output ;
44
47
_logger . Setup ( p => p . IsEnabled ( It . IsAny < LogLevel > ( ) ) ) . Returns ( true ) ;
48
+
45
49
}
46
50
47
51
[ Fact ]
@@ -51,6 +55,8 @@ public void RegisteredPlugIns_WhenCalled_ReturnsListOfPlugIns()
51
55
52
56
var result = factory . RegisteredPlugIns ( ) . OrderBy ( r => r . Value ) . ToArray ( ) ;
53
57
58
+ _output . WriteLine ( $ "result now = { JsonSerializer . Serialize ( result ) } ") ;
59
+
54
60
Assert . Equal ( 3 , result . Length ) ;
55
61
56
62
Assert . Equal ( typeof ( DicomDeidentifier ) . GetCustomAttribute < PlugInNameAttribute > ( ) . Name , result [ 0 ] . Key ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ $schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
3
+ "diagnosticMessages" : true
4
+ }
You can’t perform that action at this time.
0 commit comments