File tree 2 files changed +31
-1
lines changed
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -929,5 +929,35 @@ await testContext.Events
929
929
}
930
930
931
931
#endregion
932
+
933
+ #region DocumentGroup Examples
934
+
935
+ [ TestMethod ]
936
+ public async Task CreateDocumentGroup ( )
937
+ {
938
+ // Upload test documents
939
+ await using var fileStream = File . OpenRead ( PdfWithSignatureField ) ;
940
+ var testDocument1 = await testContext . Documents
941
+ . UploadDocumentAsync ( fileStream , "ForDocumentGroupFile-1.pdf" ) ;
942
+ var testDocument2 = await testContext . Documents
943
+ . UploadDocumentAsync ( fileStream , "ForDocumentGroupFile-2.pdf" ) ;
944
+
945
+ var documents = new List < SignNowDocument > ( ) ;
946
+
947
+ for ( int i = 1 ; i < 2 ; i ++ )
948
+ {
949
+ var upload = await testContext . Documents
950
+ . UploadDocumentAsync ( fileStream , $ "ForDocumentGroupFile-{ i } .pdf") ;
951
+ var doc = await testContext . Documents . GetDocumentAsync ( upload . Id ) . ConfigureAwait ( false ) ;
952
+ documents . Add ( doc ) ;
953
+ }
954
+
955
+ var documentGroup = await testContext . DocumentGroup . CreateDocumentGroupAsync (
956
+ "CreateDocumentGroupTest" , documents ) . ConfigureAwait ( false ) ;
957
+
958
+ Assert . IsTrue ( documentGroup . Id . Length == 40 ) ;
959
+ }
960
+
961
+ #endregion
932
962
}
933
963
}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public async Task<DocumentGroupCreateResponse> CreateDocumentGroupAsync(string g
28
28
var requestOptions = new PostHttpRequestOptions
29
29
{
30
30
RequestUrl = new Uri ( ApiBaseUrl , "/documentgroup" ) ,
31
- Content = new CreateDocumentGroupRequest ( documents ) ,
31
+ Content = new CreateDocumentGroupRequest ( documents ) { GroupName = groupName } ,
32
32
Token = Token
33
33
} ;
34
34
You can’t perform that action at this time.
0 commit comments