@@ -24,6 +24,7 @@ public class RevocationBusinessLogicTests
24
24
private readonly IWalletService _walletService ;
25
25
private readonly IIdentityService _identityService ;
26
26
private readonly IIdentityData _identityData ;
27
+ private readonly IIssuerRepositories _issuerRepositories ;
27
28
28
29
public RevocationBusinessLogicTests ( )
29
30
{
@@ -32,7 +33,7 @@ public RevocationBusinessLogicTests()
32
33
. ForEach ( b => _fixture . Behaviors . Remove ( b ) ) ;
33
34
_fixture . Behaviors . Add ( new OmitOnRecursionBehavior ( ) ) ;
34
35
35
- var issuerRepositories = A . Fake < IIssuerRepositories > ( ) ;
36
+ _issuerRepositories = A . Fake < IIssuerRepositories > ( ) ;
36
37
_documentRepository = A . Fake < IDocumentRepository > ( ) ;
37
38
_credentialRepository = A . Fake < ICredentialRepository > ( ) ;
38
39
_walletService = A . Fake < IWalletService > ( ) ;
@@ -41,10 +42,10 @@ public RevocationBusinessLogicTests()
41
42
A . CallTo ( ( ) => _identityData . Bpnl ) . Returns ( Bpnl ) ;
42
43
A . CallTo ( ( ) => _identityService . IdentityData ) . Returns ( _identityData ) ;
43
44
44
- A . CallTo ( ( ) => issuerRepositories . GetInstance < IDocumentRepository > ( ) ) . Returns ( _documentRepository ) ;
45
- A . CallTo ( ( ) => issuerRepositories . GetInstance < ICredentialRepository > ( ) ) . Returns ( _credentialRepository ) ;
45
+ A . CallTo ( ( ) => _issuerRepositories . GetInstance < IDocumentRepository > ( ) ) . Returns ( _documentRepository ) ;
46
+ A . CallTo ( ( ) => _issuerRepositories . GetInstance < ICredentialRepository > ( ) ) . Returns ( _credentialRepository ) ;
46
47
47
- _sut = new RevocationBusinessLogic ( issuerRepositories , _walletService , _identityService ) ;
48
+ _sut = new RevocationBusinessLogic ( _issuerRepositories , _walletService , _identityService ) ;
48
49
}
49
50
50
51
#region RevokeIssuerCredential
@@ -155,6 +156,7 @@ public async Task RevokeIssuerCredential_WithValid_CallsExpected()
155
156
A . CallTo ( ( ) => _walletService . RevokeCredentialForIssuer ( A < Guid > . _ , A < CancellationToken > . _ ) ) . MustHaveHappenedOnceExactly ( ) ;
156
157
document . DocumentStatusId . Should ( ) . Be ( DocumentStatusId . INACTIVE ) ;
157
158
credential . CompanySsiDetailStatusId . Should ( ) . Be ( CompanySsiDetailStatusId . REVOKED ) ;
159
+ A . CallTo ( ( ) => _issuerRepositories . SaveAsync ( ) ) . MustHaveHappenedOnceExactly ( ) ;
158
160
}
159
161
160
162
#endregion
0 commit comments