コード例 #1
0
  @Test
  public void addPhotosTest() throws BusinessLogicException {
    ItinerarioEntity entity = data.get(0);
    FotoEntity fotoEntity = factory.manufacturePojo(FotoEntity.class);
    FotoEntity response = itinerarioLogic.addPhoto(viajero.getId(), entity.getId(), fotoEntity);

    Assert.assertNotNull(response);
    Assert.assertEquals(fotoEntity.getId(), response.getId());
  }
コード例 #2
0
  @Test
  public void getPhotoTest() {
    ItinerarioEntity entity = data.get(0);
    FotoEntity fotoEntity = fotoData.get(0);
    FotoEntity response =
        itinerarioLogic.getPhoto(viajero.getId(), entity.getId(), fotoEntity.getId());

    Assert.assertEquals(fotoEntity.getId(), response.getId());
    Assert.assertEquals(fotoEntity.getName(), response.getName());
    Assert.assertEquals(fotoEntity.getSrc(), response.getSrc());
  }