Пример #1
0
  // @Test(dependsOnMethods = "read")
  public void update() throws Exception {
    Container container = repository.findOne(id);

    Container newContainer =
        new Container.Builder(container.getContainerCode())
            .copy(container)
            .width(500)
            .height(500)
            .build();

    repository.save(newContainer);
    Container updatedContainer = repository.findOne(id);

    Assert.assertEquals(500, updatedContainer.getWidth());
    Assert.assertEquals(200, container.getWidth());
  }
Пример #2
0
 // @Test(dependsOnMethods = "create")
 public void read() throws Exception {
   Container container = repository.findOne(id);
   Assert.assertNotNull(container);
   Assert.assertEquals(2, container.getPackagedProd().size());
 }