Ejemplo n.º 1
0
  @Test
  @Ignore
  public void testMoreHutsPaidAndNew() {
    final int id1 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id1);
    entityManager.clear();

    final int id2 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id2);
    entityManager.clear();

    final int id3 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id3);
    entityManager.clear();

    final int id4 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());

    reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    //
    final List<Reservation> reservations = reservationRepository.findAll();

    assertNotNull(reservations);
    assertFalse(reservations.isEmpty());
    assertEquals(5, reservations.size());
  }
Ejemplo n.º 2
0
  @Test(expected = RuntimeException.class)
  //    @Ignore("mails")
  public void testMoreHutsPaid() {
    final int id1 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id1);
    entityManager.clear();

    final int id2 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id2);
    entityManager.clear();

    final int id3 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id3);
    entityManager.clear();

    final int id4 =
        reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
    reservationService.updateReservationState(ReservationState.PAID.name(), id4);
    entityManager.clear();

    reservationService.createReservationAdmin(ReservationModelUtils.createReservationModel());
  }