Search in sources :

Example 1 with CustomerPaymentMethod

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()));
}
Also used : CustomerPaymentMethod(com.querydsl.example.dto.CustomerPaymentMethod) Order(com.querydsl.example.dto.Order) OrderProduct(com.querydsl.example.dto.OrderProduct) Test(org.junit.Test)

Aggregations

CustomerPaymentMethod (com.querydsl.example.dto.CustomerPaymentMethod)1 Order (com.querydsl.example.dto.Order)1 OrderProduct (com.querydsl.example.dto.OrderProduct)1 Test (org.junit.Test)1