use of com.querydsl.example.dto.Product in project querydsl by querydsl.
the class ProductDaoTest method update.
@Test
public void update() {
Product product = productDao.findById(1);
productDao.save(product);
}
use of com.querydsl.example.dto.Product in project querydsl by querydsl.
the class ProductDaoTest method delete.
@Test
public void delete() {
Product product = new Product();
product.setSupplier(supplierDao.findById(1));
product.setName("ProductX");
product.setLocalizations(ImmutableSet.of(new ProductL10n()));
productDao.save(product);
assertNotNull(productDao.findById(product.getId()));
productDao.delete(product);
assertNull(productDao.findById(product.getId()));
}
Aggregations