Search in sources :

Example 1 with ReservationApiController

use of alfio.controller.api.ReservationApiController in project alf.io by alfio-event.

the class ReservationFlowIntegrationTest method ensureConfiguration.

@Before
public void ensureConfiguration() {
    IntegrationTestUtil.ensureMinimalConfiguration(configurationRepository);
    List<TicketCategoryModification> categories = Collections.singletonList(new TicketCategoryModification(null, "default", AVAILABLE_SEATS, new DateTimeModification(LocalDate.now().minusDays(1), LocalTime.now()), new DateTimeModification(LocalDate.now().plusDays(1), LocalTime.now()), DESCRIPTION, BigDecimal.TEN, false, "", false, null, null, null, null, null));
    Pair<Event, String> eventAndUser = initEvent(categories, organizationRepository, userManager, eventManager, eventRepository);
    event = eventAndUser.getKey();
    user = eventAndUser.getValue() + "_owner";
    // 
    TemplateManager templateManager = Mockito.mock(TemplateManager.class);
    reservationApiController = new ReservationApiController(eventRepository, ticketHelper, templateManager, i18nManager, euVatChecker, ticketReservationRepository, ticketReservationManager);
}
Also used : DateTimeModification(alfio.model.modification.DateTimeModification) TicketCategoryModification(alfio.model.modification.TicketCategoryModification) TemplateManager(alfio.util.TemplateManager) ReservationApiController(alfio.controller.api.ReservationApiController) Before(org.junit.Before)

Aggregations

ReservationApiController (alfio.controller.api.ReservationApiController)1 DateTimeModification (alfio.model.modification.DateTimeModification)1 TicketCategoryModification (alfio.model.modification.TicketCategoryModification)1 TemplateManager (alfio.util.TemplateManager)1 Before (org.junit.Before)1