-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add: deleteSignatory * fix delete signatory test assertion
- Loading branch information
1 parent
0f6ea3f
commit 8bf517e
Showing
4 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
Criipto.Signatures.IntegrationTests/DeleteSignatoryTests.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,46 @@ | ||
using Xunit; | ||
using Criipto.Signatures; | ||
using Criipto.Signatures.Models; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
namespace Criipto.Signatures.IntegrationTests; | ||
|
||
public class DeleteSignatoryTests | ||
{ | ||
|
||
[Fact] | ||
public async void MutationDeletesSignatory() | ||
{ | ||
using (var client = new CriiptoSignaturesClient(Dsl.CLIENT_ID, Dsl.CLIENT_SECRET, "test")) | ||
{ | ||
// Arrange | ||
var signatureOrder = await client.CreateSignatureOrder( | ||
new CreateSignatureOrderInput() | ||
{ | ||
title = "Title", | ||
expiresInDays = 1, | ||
documents = new List<DocumentInput>(){ | ||
new DocumentInput { | ||
pdf = | ||
new PadesDocumentInput | ||
{ | ||
title = "TEST", | ||
blob = Dsl.Sample | ||
} | ||
} | ||
}, | ||
} | ||
); | ||
|
||
var signatory = await client.AddSignatory( | ||
signatureOrder | ||
); | ||
|
||
// Act | ||
var actual = await client.DeleteSignatory(signatory); | ||
|
||
// Assert | ||
Assert.Empty(actual.signatories); | ||
} | ||
} | ||
} |
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