use of com.google.cloud.retail.v2.Product in project java-vision by googleapis.
the class ITSystemTest method listProductsTest.
@Test
public void listProductsTest() {
ListProductsRequest request = ListProductsRequest.newBuilder().setParent(LOCATION_NAME).build();
for (Product actualProduct : productSearchClient.listProducts(request).iterateAll()) {
if (product.getName().equals(actualProduct.getName())) {
assertEquals(PRODUCT_DISPLAY_NAME, actualProduct.getDisplayName());
assertEquals(PRODUCT_CATEGORY, actualProduct.getProductCategory());
}
}
}
Aggregations