use of org.jboss.pnc.bacon.pig.impl.config.ProductConfig in project bacon by project-ncl.
the class PncEntitiesImporter method generateProduct.
private Product generateProduct() {
ProductConfig productConfig = pigConfiguration.getProduct();
Product product = Product.builder().name(productConfig.getName()).abbreviation(productConfig.getAbbreviation()).build();
try {
return productClient.createNew(product);
} catch (ClientException e) {
throw new RuntimeException("Failed to create the product", e);
}
}
use of org.jboss.pnc.bacon.pig.impl.config.ProductConfig in project bacon by project-ncl.
the class ResolveOnlyRepositoryTest method mockPigConfigurationAndMethods.
private PigConfiguration mockPigConfigurationAndMethods() {
PigConfiguration pigConfiguration = Mockito.mock(PigConfiguration.class, Mockito.RETURNS_DEEP_STUBS);
ProductConfig productConfig = Mockito.mock(ProductConfig.class);
doReturn(productConfig).when(pigConfiguration).getProduct();
doReturn("sample").when(productConfig).getName();
return pigConfiguration;
}
Aggregations