use of org.candlepin.dto.manifest.v1.ProductDTO in project candlepin by candlepin.
the class OwnerProductResourceTest method getProduct.
@Test
public void getProduct() {
Owner owner = this.createOwner("Example-Corporation");
Product entity = this.createProduct("test_product", "test_product", owner);
securityInterceptor.enable();
ProductDTO result = this.ownerProductResource.getProduct(owner.getKey(), entity.getId());
ProductDTO expected = this.modelTranslator.translate(entity, ProductDTO.class);
assertNotNull(result);
assertEquals(expected, result);
}
use of org.candlepin.dto.manifest.v1.ProductDTO in project candlepin by candlepin.
the class ProductResourceTest method getProduct.
@Test
public void getProduct() {
Owner owner = this.createOwner("Example-Corporation");
Product entity = this.createProduct("test_product", "test_product", owner);
ProductDTO expected = this.modelTranslator.translate(entity, ProductDTO.class);
if (entity.isLocked()) {
throw new RuntimeException("entity is locked...?");
}
securityInterceptor.enable();
ProductDTO result = productResource.getProduct(entity.getUuid());
assertNotNull(result);
assertEquals(result, expected);
}
Aggregations