use of com.google.cloud.spring.storage.GoogleStorageLocation in project spring-cloud-gcp by GoogleCloudPlatform.
the class DocumentOcrTemplateIntegrationTests method testParseOcrResultSet.
@Test
void testParseOcrResultSet() throws InvalidProtocolBufferException {
GoogleStorageLocation ocrOutputPrefix = GoogleStorageLocation.forFolder("vision-integration-test-bucket", "json_output_set/");
DocumentOcrResultSet result = this.documentOcrTemplate.readOcrOutputFileSet(ocrOutputPrefix);
String text = result.getPage(2).getText();
assertThat(text).contains("Hello World. Is mayonnaise an instrument?");
}
Aggregations