use of com.querydsl.example.dto.Order in project querydsl by querydsl.
the class OrderDaoTest method update.
@Test
public void update() {
Order order = orderDao.findById(1);
orderDao.save(order);
}
use of com.querydsl.example.dto.Order in project querydsl by querydsl.
the class OrderDaoTest method delete.
@Test
public void delete() {
OrderProduct orderProduct = new OrderProduct();
orderProduct.setProductId(1L);
orderProduct.setQuantity(1);
// FIXME
CustomerPaymentMethod paymentMethod = new CustomerPaymentMethod();
Order order = new Order();
order.setCustomerPaymentMethod(paymentMethod);
order.setOrderProducts(Collections.singleton(orderProduct));
orderDao.save(order);
assertNotNull(order.getId());
orderDao.delete(order);
assertNull(orderDao.findById(order.getId()));
}
Aggregations