public void VerifyCollectionPresentation() { // Set request var testFile = TestFiles.PresentationStorageSigned.FirstOrDefault(); var fileInfo = testFile.GetFileInfo(); var signedFileName = $@"Output\PresentationCollectionSigned.{testFile.Extension}"; var optionsBarcode = new VerifyBarcodeOptions(); TestsVerifyBarcode.PopulateOptions(optionsBarcode); //Digital verification is not supported for presentations var optionsQrCode = new VerifyQRCodeOptions(); TestsVerifyQrCode.PopulateOptions(optionsQrCode); var optionsText = new VerifyTextOptions(); TestsVerifyText.PopulateOptions(optionsText); var verifySettings = new VerifySettings(); verifySettings.FileInfo = fileInfo; verifySettings.Options = new List <VerifyOptions>() { optionsBarcode, optionsQrCode, optionsText }; var request = new VerifySignaturesRequest(verifySettings); // Get and check result var response = SignatureApi.VerifySignatures(request); CheckResponse(response, testFile); }
public static void PopulateOptions(VerifyTextOptions options) { options.Page = 1; options.AllPages = true; options.PagesSetup = new PagesSetup() { EvenPages = false, FirstPage = true, LastPage = false, OddPages = false, PageNumbers = new List <int?>() { 1 } }; options.SignatureType = SignatureTypeEnum.Text; options.MatchType = VerifyTextOptions.MatchTypeEnum.Contains; options.Text = "John Smith"; }
public void VerifyTextSpreadsheet() { // Set request var testFile = TestFiles.SpreadsheetStorageSigned.FirstOrDefault(); var fileInfo = testFile.GetFileInfo(); var options = new VerifyTextOptions(); PopulateOptions(options); var verifySettings = new VerifySettings(); verifySettings.FileInfo = fileInfo; verifySettings.Options = new List <VerifyOptions>() { options }; var request = new VerifySignaturesRequest(verifySettings); // Get and check result var response = SignatureApi.VerifySignatures(request); CheckResponse(response, testFile); }
public void VerifyCollectionWordProcessing() { // Set request var testFile = TestFiles.WordProcessingStorageSigned.FirstOrDefault(); var fileInfo = testFile.GetFileInfo(); var signedFileName = $@"Output\WordProcessingStorageCollectionSigned.{testFile.Extension}"; var optionsBarcode = new VerifyBarcodeOptions(); TestsVerifyBarcode.PopulateOptions(optionsBarcode); var optionsQrCode = new VerifyQRCodeOptions(); TestsVerifyQrCode.PopulateOptions(optionsQrCode); var optionsDigital = new VerifyDigitalOptions(); TestsVerifyDigital.PopulateOptions(optionsDigital); var optionsText = new VerifyTextOptions(); TestsVerifyText.PopulateOptions(optionsText); var verifySettings = new VerifySettings(); verifySettings.FileInfo = fileInfo; verifySettings.Options = new List <VerifyOptions>() { optionsBarcode, optionsQrCode, optionsDigital, optionsText }; var request = new VerifySignaturesRequest(verifySettings); // Get and check result var response = SignatureApi.VerifySignatures(request); CheckResponse(response, testFile); }