Search in sources :

Example 1 with TicketCategoryDescriptionRepository

use of alfio.repository.TicketCategoryDescriptionRepository in project alf.io by alfio-event.

the class EventManagerCategoriesTest method init.

@BeforeEach
void init() {
    ticketCategoryRepository = mock(TicketCategoryRepository.class);
    TicketCategoryDescriptionRepository ticketCategoryDescriptionRepository = mock(TicketCategoryDescriptionRepository.class);
    EventRepository eventRepository = mock(EventRepository.class);
    event = mock(Event.class);
    when(event.getId()).thenReturn(eventId);
    eventManager = new EventManager(null, eventRepository, null, ticketCategoryRepository, ticketCategoryDescriptionRepository, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, clockProvider(), mock(SubscriptionRepository.class));
    when(eventRepository.countExistingTickets(0)).thenReturn(availableSeats);
    when(event.getZoneId()).thenReturn(ZoneId.systemDefault());
}
Also used : TicketCategoryDescriptionRepository(alfio.repository.TicketCategoryDescriptionRepository) Event(alfio.model.Event) EventRepository(alfio.repository.EventRepository) TicketCategoryRepository(alfio.repository.TicketCategoryRepository) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Event (alfio.model.Event)1 EventRepository (alfio.repository.EventRepository)1 TicketCategoryDescriptionRepository (alfio.repository.TicketCategoryDescriptionRepository)1 TicketCategoryRepository (alfio.repository.TicketCategoryRepository)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1