public async Task ProcessFields_ShouldBeOk() { // Arrange var submitImageTask = await SubmitImageAsync(TestFile.Fields); var parameters = new FieldsProcessingParams { TaskId = submitImageTask.TaskId, WriteRecognitionVariants = true, }; // Act TaskInfo processFieldsTask; using (var fileStream = GetResourceFileStream(TestFile.ProcessFieldsXmlConfig)) { processFieldsTask = await ApiClient.ProcessFieldsAsync( parameters, fileStream, TestFile.ProcessFieldsXmlConfig, true ); } // Assert CheckResultTask(processFieldsTask, submitImageTask.TaskId); }
/// <inheritdoc /> public Task <TaskInfo> ProcessFieldsAsync( FieldsProcessingParams parameters, Stream fileStream, string fileName, bool waitTaskFinished = false, CancellationToken cancellationToken = default) { return(StartTaskAsync( HttpMethod.Post, Urls.Ocr.ProcessFields, parameters, fileStream, fileName, waitTaskFinished, cancellationToken)); }