use of com.commercetools.sync.services.ProductTypeService in project commercetools-sync-java by commercetools.
the class ProductTypeServiceImplTest method fetchProductType_WithEmptyKey_ShouldNotFetchProductType.
@Test
void fetchProductType_WithEmptyKey_ShouldNotFetchProductType() {
// preparation
final SphereClient sphereClient = mock(SphereClient.class);
final ProductTypeSyncOptions syncOptions = ProductTypeSyncOptionsBuilder.of(sphereClient).build();
final ProductTypeService productTypeService = new ProductTypeServiceImpl(syncOptions);
// test
final CompletionStage<Optional<ProductType>> result = productTypeService.fetchProductType("");
// assertions
assertThat(result).isCompletedWithValue(Optional.empty());
verify(sphereClient, never()).execute(any());
}
use of com.commercetools.sync.services.ProductTypeService in project commercetools-sync-java by commercetools.
the class ProductTypeServiceImplTest method fetchProductType_WithNullKey_ShouldNotFetchProductType.
@Test
void fetchProductType_WithNullKey_ShouldNotFetchProductType() {
// preparation
final SphereClient sphereClient = mock(SphereClient.class);
final ProductTypeSyncOptions syncOptions = ProductTypeSyncOptionsBuilder.of(sphereClient).build();
final ProductTypeService productTypeService = new ProductTypeServiceImpl(syncOptions);
// test
final CompletionStage<Optional<ProductType>> result = productTypeService.fetchProductType(null);
// assertions
assertThat(result).isCompletedWithValue(Optional.empty());
verify(sphereClient, never()).execute(any());
}
Aggregations