use of com.querydsl.example.dto.CustomerPaymentMethod 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