26
26
using Monai . Deploy . InformaticsGateway . Services . Scu ;
27
27
using Monai . Deploy . InformaticsGateway . SharedTest ;
28
28
using Moq ;
29
+ using xRetry ;
29
30
using Xunit ;
30
31
31
32
namespace Monai . Deploy . InformaticsGateway . Test . Services . Scu
@@ -70,7 +71,7 @@ public ScuServiceTest(DicomScpFixture dicomScp)
70
71
_dicomScp . Start ( _port ) ;
71
72
}
72
73
73
- [ Fact ]
74
+ [ RetryFact ]
74
75
public void GivenAScuService_WhenInitialized_ExpectParametersToBeValidated ( )
75
76
{
76
77
Assert . Throws < ArgumentNullException > ( ( ) => new ScuService ( null , null , null ) ) ;
@@ -79,7 +80,7 @@ public void GivenAScuService_WhenInitialized_ExpectParametersToBeValidated()
79
80
_ = new ScuService ( _serviceScopeFactory . Object , _logger . Object , _options ) ;
80
81
}
81
82
82
- [ Fact ]
83
+ [ RetryFact ]
83
84
public void GivenAScuService_WhenStartAsyncIsCalled_ExpectServiceStatusToBeSet ( )
84
85
{
85
86
var svc = new ScuService ( _serviceScopeFactory . Object , _logger . Object , _options ) ;
@@ -88,7 +89,7 @@ public void GivenAScuService_WhenStartAsyncIsCalled_ExpectServiceStatusToBeSet()
88
89
Assert . Equal ( ServiceStatus . Running , svc . Status ) ;
89
90
}
90
91
91
- [ Fact ]
92
+ [ RetryFact ]
92
93
public async Task GivenAValidDicomEntity_WhenRequestToCEcho_ExpectToReturnSucess ( )
93
94
{
94
95
var svc = new ScuService ( _serviceScopeFactory . Object , _logger . Object , _options ) ;
@@ -105,7 +106,7 @@ public async Task GivenAValidDicomEntity_WhenRequestToCEcho_ExpectToReturnSucess
105
106
Assert . Empty ( response . Message ) ;
106
107
}
107
108
108
- [ Fact ]
109
+ [ RetryFact ]
109
110
public async Task GivenACEchoRequest_WhenRejected_ReturnStatusAssociationRejected ( )
110
111
{
111
112
var svc = new ScuService ( _serviceScopeFactory . Object , _logger . Object , _options ) ;
@@ -122,7 +123,7 @@ public async Task GivenACEchoRequest_WhenRejected_ReturnStatusAssociationRejecte
122
123
Assert . StartsWith ( "Association rejected" , response . Message ) ;
123
124
}
124
125
125
- [ Fact ]
126
+ [ RetryFact ]
126
127
public async Task GivenACEchoRequest_WhenAborted_ReturnStatusAssociationAborted ( )
127
128
{
128
129
var svc = new ScuService ( _serviceScopeFactory . Object , _logger . Object , _options ) ;
@@ -139,7 +140,7 @@ public async Task GivenACEchoRequest_WhenAborted_ReturnStatusAssociationAborted(
139
140
Assert . StartsWith ( "Association Abort" , response . Message ) ;
140
141
}
141
142
142
- [ Fact ]
143
+ [ RetryFact ]
143
144
public async Task GivenACEchoRequest_WhenRemoteServerIsUnreachable_ReturnStatusAssociationRejected ( )
144
145
{
145
146
var svc = new ScuService ( _serviceScopeFactory . Object , _logger . Object , _options ) ;
0 commit comments