コード例 #1
0
  @Test
  public void create() throws Exception {

    orderId = 554l;
    orderLineId = 33l;
    quantity = 4;

    orderLine = new OrderLine.Builder(orderId, orderLineId, quantity).build();

    Assert.assertNotNull(orderLine);
    Assert.assertEquals(orderId, orderLine.getOrderId());

    repository.save(orderLine);
    id = orderLine.getId();

    Assert.assertEquals(id, orderLine.getId());
  }
コード例 #2
0
  @Test(dependsOnMethods = "create")
  public void testGetOrderLine() throws Exception {
    orderLine = service.getOrderLine(id);

    Assert.assertEquals(id, orderLine.getId());
  }