Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Java-Vision IT test cases #8248

Merged
merged 10 commits into from
Aug 31, 2022
6 changes: 3 additions & 3 deletions java-vision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.0.0')
implementation platform('com.google.cloud:libraries-bom:26.1.0')

implementation 'com.google.cloud:google-cloud-vision'
```
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-vision:3.0.1'
implementation 'com.google.cloud:google-cloud-vision:3.1.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.0.1"
libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.1.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public void detectSafeSearchGcsTest() throws IOException {
}

@Test
public void detectWebEntitiesGcsTest() throws IOException {
public void detectWebEntitiesGcsTest() {
ImageSource imgSource =
ImageSource.newBuilder().setGcsImageUri(SAMPLE_BUCKET + "landmark/pofa.jpg").build();
Image img = Image.newBuilder().setSource(imgSource).build();
Expand All @@ -492,7 +492,7 @@ public void detectWebEntitiesGcsTest() throws IOException {
actual.add(entity.getDescription());
}
}
assertThat(actual).contains("The Palace Of Fine Arts");
assertThat(actual).contains("Palace of Fine Arts");
}

@Test
Expand Down Expand Up @@ -547,14 +547,12 @@ public void detectWebEntitiesIncludeGeoResultsGcsTest() {
imageAnnotatorClient.batchAnnotateImages(ImmutableList.of(request));
List<AnnotateImageResponse> responses = response.getResponsesList();
List<String> actual = new ArrayList<>();
System.out.println("WebEntitiesGeo SIZE");
System.out.println(actual.size());
for (AnnotateImageResponse imgResponse : responses) {
for (WebDetection.WebEntity entity : imgResponse.getWebDetection().getWebEntitiesList()) {
actual.add(entity.getDescription());
}
}
assertThat(actual).contains("The Palace Of Fine Arts");
assertThat(actual).contains("Palace of Fine Arts");
}

@Test
Expand Down