Search in sources :

Example 1 with OrganizationRepository

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

the class AdminReservationManagerIntegrationTest method testReserveMixed.

@Test
public void testReserveMixed() throws Exception {
    List<TicketCategoryModification> categories = Collections.singletonList(new TicketCategoryModification(null, "default", 1, new DateTimeModification(LocalDate.now(), LocalTime.now()), new DateTimeModification(LocalDate.now(), LocalTime.now()), DESCRIPTION, BigDecimal.TEN, false, "", false, null, null, null, null, null));
    Pair<Event, String> eventWithUsername = initEvent(categories, organizationRepository, userManager, eventManager, eventRepository);
    Event event = eventWithUsername.getKey();
    String username = eventWithUsername.getValue();
    DateTimeModification expiration = DateTimeModification.fromZonedDateTime(ZonedDateTime.now().plusDays(1));
    CustomerData customerData = new CustomerData("Integration", "Test", "integration-test@test.ch", "Billing Address", "en");
    TicketCategory existingCategory = ticketCategoryRepository.findByEventId(event.getId()).get(0);
    Category resExistingCategory = new Category(existingCategory.getId(), "", existingCategory.getPrice());
    Category resNewCategory = new Category(null, "name", new BigDecimal("100.00"));
    int attendees = 1;
    List<TicketsInfo> ticketsInfoList = Arrays.asList(new TicketsInfo(resExistingCategory, generateAttendees(attendees), false, false), new TicketsInfo(resNewCategory, generateAttendees(attendees), false, false), new TicketsInfo(resExistingCategory, generateAttendees(attendees), false, false));
    AdminReservationModification modification = new AdminReservationModification(expiration, customerData, ticketsInfoList, "en", false, null);
    Result<Pair<TicketReservation, List<Ticket>>> result = adminReservationManager.createReservation(modification, event.getShortName(), username);
    assertTrue(result.isSuccess());
    Pair<TicketReservation, List<Ticket>> data = result.getData();
    List<Ticket> tickets = data.getRight();
    assertTrue(tickets.size() == 3);
    assertNotNull(data.getLeft());
    assertTrue(tickets.stream().allMatch(t -> t.getTicketsReservationId().equals(data.getKey().getId())));
    int resExistingCategoryId = tickets.get(0).getCategoryId();
    int resNewCategoryId = tickets.get(2).getCategoryId();
    Event modified = eventManager.getSingleEvent(event.getShortName(), username);
    assertEquals(AVAILABLE_SEATS, eventRepository.countExistingTickets(event.getId()).intValue());
    assertEquals(3, ticketRepository.findPendingTicketsInCategories(Arrays.asList(resExistingCategoryId, resNewCategoryId)).size());
    assertEquals(3, ticketRepository.findTicketsInReservation(data.getLeft().getId()).size());
    String reservationId = data.getLeft().getId();
    assertEquals(ticketRepository.findTicketsInReservation(reservationId).stream().findFirst().get().getId(), ticketRepository.findFirstTicketInReservation(reservationId).get().getId());
    ticketCategoryRepository.findByEventId(event.getId()).forEach(tc -> assertTrue(specialPriceRepository.findAllByCategoryId(tc.getId()).stream().allMatch(sp -> sp.getStatus() == SpecialPrice.Status.PENDING)));
    adminReservationManager.confirmReservation(event.getShortName(), data.getLeft().getId(), username);
    ticketCategoryRepository.findByEventId(event.getId()).forEach(tc -> assertTrue(specialPriceRepository.findAllByCategoryId(tc.getId()).stream().allMatch(sp -> sp.getStatus() == SpecialPrice.Status.TAKEN)));
    assertFalse(ticketRepository.findAllReservationsConfirmedButNotAssigned(event.getId()).contains(data.getLeft().getId()));
}
Also used : alfio.repository(alfio.repository) IntStream(java.util.stream.IntStream) java.util(java.util) BeforeClass(org.junit.BeforeClass) ZonedDateTime(java.time.ZonedDateTime) RunWith(org.junit.runner.RunWith) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) Attendee(alfio.model.modification.AdminReservationModification.Attendee) RepositoryConfiguration(alfio.config.RepositoryConfiguration) BigDecimal(java.math.BigDecimal) SpringJUnit4ClassRunner(org.springframework.test.context.junit4.SpringJUnit4ClassRunner) Pair(org.apache.commons.lang3.tuple.Pair) LocalTime(java.time.LocalTime) Triple(org.apache.commons.lang3.tuple.Triple) OrganizationRepository(alfio.repository.user.OrganizationRepository) TicketsInfo(alfio.model.modification.AdminReservationModification.TicketsInfo) Test(org.junit.Test) CustomerData(alfio.model.modification.AdminReservationModification.CustomerData) IntegrationTestUtil(alfio.test.util.IntegrationTestUtil) DateUtils(org.apache.commons.lang3.time.DateUtils) Result(alfio.model.result.Result) Collectors.toList(java.util.stream.Collectors.toList) Initializer(alfio.config.Initializer) alfio.model(alfio.model) UserManager(alfio.manager.user.UserManager) ContextConfiguration(org.springframework.test.context.ContextConfiguration) LocalDate(java.time.LocalDate) DataSourceConfiguration(alfio.config.DataSourceConfiguration) Category(alfio.model.modification.AdminReservationModification.Category) TestConfiguration(alfio.TestConfiguration) Assert(org.junit.Assert) alfio.model.modification(alfio.model.modification) Transactional(org.springframework.transaction.annotation.Transactional) Category(alfio.model.modification.AdminReservationModification.Category) CustomerData(alfio.model.modification.AdminReservationModification.CustomerData) TicketsInfo(alfio.model.modification.AdminReservationModification.TicketsInfo) BigDecimal(java.math.BigDecimal) Collectors.toList(java.util.stream.Collectors.toList) Pair(org.apache.commons.lang3.tuple.Pair) Test(org.junit.Test)

Example 2 with OrganizationRepository

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

the class EventManagerIntegrationTest method testDecreaseEventSeatsWithABoundedCategory.

@Test
public void testDecreaseEventSeatsWithABoundedCategory() {
    List<TicketCategoryModification> categories = Collections.singletonList(new TicketCategoryModification(null, "default", 10, new DateTimeModification(LocalDate.now(), LocalTime.now()), new DateTimeModification(LocalDate.now(), LocalTime.now()), DESCRIPTION, BigDecimal.TEN, false, "", true, null, null, null, null, null));
    Pair<Event, String> pair = initEvent(categories, organizationRepository, userManager, eventManager, eventRepository);
    Event event = pair.getKey();
    EventModification update = new EventModification(event.getId(), Event.EventType.INTERNAL, null, null, null, null, null, null, null, event.getOrganizationId(), null, "0.0", "0.0", ZoneId.systemDefault().getId(), null, DateTimeModification.fromZonedDateTime(event.getBegin()), DateTimeModification.fromZonedDateTime(event.getEnd()), event.getRegularPrice(), event.getCurrency(), 10, event.getVat(), event.isVatIncluded(), event.getAllowedPaymentProxies(), null, event.isFreeOfCharge(), null, 7, null, null);
    eventManager.updateEventPrices(event, update, pair.getValue());
    List<Ticket> tickets = ticketRepository.findFreeByEventId(event.getId());
    assertNotNull(tickets);
    assertFalse(tickets.isEmpty());
    assertEquals(10, tickets.size());
    assertTrue(tickets.stream().allMatch(t -> t.getCategoryId() != null));
}
Also used : alfio.repository(alfio.repository) java.util(java.util) BeforeClass(org.junit.BeforeClass) ZonedDateTime(java.time.ZonedDateTime) RunWith(org.junit.runner.RunWith) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) RepositoryConfiguration(alfio.config.RepositoryConfiguration) BigDecimal(java.math.BigDecimal) ErrorCode(alfio.model.result.ErrorCode) SpringJUnit4ClassRunner(org.springframework.test.context.junit4.SpringJUnit4ClassRunner) Pair(org.apache.commons.lang3.tuple.Pair) LocalTime(java.time.LocalTime) OrganizationRepository(alfio.repository.user.OrganizationRepository) Test(org.junit.Test) IntegrationTestUtil(alfio.test.util.IntegrationTestUtil) ZoneId(java.time.ZoneId) ConfigurationRepository(alfio.repository.system.ConfigurationRepository) DateUtils(org.apache.commons.lang3.time.DateUtils) Result(alfio.model.result.Result) TicketCategory(alfio.model.TicketCategory) Initializer(alfio.config.Initializer) Ticket(alfio.model.Ticket) UserManager(alfio.manager.user.UserManager) ContextConfiguration(org.springframework.test.context.ContextConfiguration) LocalDate(java.time.LocalDate) DataSourceConfiguration(alfio.config.DataSourceConfiguration) Event(alfio.model.Event) TestConfiguration(alfio.TestConfiguration) Assert(org.junit.Assert) alfio.model.modification(alfio.model.modification) Transactional(org.springframework.transaction.annotation.Transactional) Ticket(alfio.model.Ticket) Event(alfio.model.Event) Test(org.junit.Test)

Example 3 with OrganizationRepository

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

the class EventManagerIntegrationTest method testUnboundedTicketsGeneration.

@Test
public void testUnboundedTicketsGeneration() {
    List<TicketCategoryModification> categories = Collections.singletonList(new TicketCategoryModification(null, "default", AVAILABLE_SEATS, new DateTimeModification(LocalDate.now(), LocalTime.now()), new DateTimeModification(LocalDate.now(), LocalTime.now()), DESCRIPTION, BigDecimal.TEN, false, "", false, null, null, null, null, null));
    Event event = initEvent(categories, organizationRepository, userManager, eventManager, eventRepository).getKey();
    List<Ticket> tickets = ticketRepository.findFreeByEventId(event.getId());
    assertNotNull(tickets);
    assertFalse(tickets.isEmpty());
    assertEquals(AVAILABLE_SEATS, tickets.size());
    assertTrue(tickets.stream().allMatch(t -> t.getCategoryId() == null));
}
Also used : alfio.repository(alfio.repository) java.util(java.util) BeforeClass(org.junit.BeforeClass) ZonedDateTime(java.time.ZonedDateTime) RunWith(org.junit.runner.RunWith) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) RepositoryConfiguration(alfio.config.RepositoryConfiguration) BigDecimal(java.math.BigDecimal) ErrorCode(alfio.model.result.ErrorCode) SpringJUnit4ClassRunner(org.springframework.test.context.junit4.SpringJUnit4ClassRunner) Pair(org.apache.commons.lang3.tuple.Pair) LocalTime(java.time.LocalTime) OrganizationRepository(alfio.repository.user.OrganizationRepository) Test(org.junit.Test) IntegrationTestUtil(alfio.test.util.IntegrationTestUtil) ZoneId(java.time.ZoneId) ConfigurationRepository(alfio.repository.system.ConfigurationRepository) DateUtils(org.apache.commons.lang3.time.DateUtils) Result(alfio.model.result.Result) TicketCategory(alfio.model.TicketCategory) Initializer(alfio.config.Initializer) Ticket(alfio.model.Ticket) UserManager(alfio.manager.user.UserManager) ContextConfiguration(org.springframework.test.context.ContextConfiguration) LocalDate(java.time.LocalDate) DataSourceConfiguration(alfio.config.DataSourceConfiguration) Event(alfio.model.Event) TestConfiguration(alfio.TestConfiguration) Assert(org.junit.Assert) alfio.model.modification(alfio.model.modification) Transactional(org.springframework.transaction.annotation.Transactional) Ticket(alfio.model.Ticket) Event(alfio.model.Event) Test(org.junit.Test)

Example 4 with OrganizationRepository

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

the class TicketReservationManagerIntegrationTest method testTicketSelection.

@Test
public void testTicketSelection() {
    List<TicketCategoryModification> categories = Arrays.asList(new TicketCategoryModification(null, "default", AVAILABLE_SEATS, new DateTimeModification(LocalDate.now(), LocalTime.now()), new DateTimeModification(LocalDate.now(), LocalTime.now()), DESCRIPTION, BigDecimal.TEN, false, "", false, null, null, null, null, null), new TicketCategoryModification(null, "default", 10, new DateTimeModification(LocalDate.now(), LocalTime.now()), new DateTimeModification(LocalDate.now(), LocalTime.now()), DESCRIPTION, BigDecimal.TEN, false, "", true, null, null, null, null, null));
    Pair<Event, String> eventAndUsername = initEvent(categories, organizationRepository, userManager, eventManager, eventRepository);
    Event event = eventAndUsername.getKey();
    TicketCategory bounded = ticketCategoryRepository.findByEventId(event.getId()).stream().filter(TicketCategory::isBounded).findFirst().orElseThrow(IllegalStateException::new);
    TicketCategory unbounded = ticketCategoryRepository.findByEventId(event.getId()).stream().filter(t -> !t.isBounded()).findFirst().orElseThrow(IllegalStateException::new);
    assertEquals(0, eventStatisticsManager.loadModifiedTickets(event.getId(), bounded.getId(), 0, null).size());
    assertEquals(Integer.valueOf(0), eventStatisticsManager.countModifiedTicket(event.getId(), bounded.getId(), null));
    assertEquals(0, eventStatisticsManager.loadModifiedTickets(event.getId(), unbounded.getId(), 0, null).size());
    TicketReservationModification tr = new TicketReservationModification();
    tr.setAmount(10);
    tr.setTicketCategoryId(bounded.getId());
    TicketReservationModification tr2 = new TicketReservationModification();
    tr2.setAmount(9);
    tr2.setTicketCategoryId(unbounded.getId());
    TicketReservationWithOptionalCodeModification mod = new TicketReservationWithOptionalCodeModification(tr, Optional.empty());
    TicketReservationWithOptionalCodeModification mod2 = new TicketReservationWithOptionalCodeModification(tr2, Optional.empty());
    String reservationId = ticketReservationManager.createTicketReservation(event, Arrays.asList(mod, mod2), Collections.emptyList(), DateUtils.addDays(new Date(), 1), Optional.empty(), Optional.empty(), Locale.ENGLISH, false);
    List<TicketReservation> reservations = ticketReservationManager.findAllReservationsInEvent(event.getId(), 0, null, null).getKey();
    assertTrue(reservations.size() == 1);
    assertEquals(reservationId, reservations.get(0).getId());
    List<Ticket> pendingTickets = ticketRepository.findPendingTicketsInCategories(Arrays.asList(bounded.getId(), unbounded.getId()));
    assertEquals(19, pendingTickets.size());
    pendingTickets.forEach(t -> assertEquals(1000, t.getFinalPriceCts()));
    List<Ticket> tickets = ticketRepository.findFreeByEventId(event.getId());
    assertEquals(1, tickets.size());
    assertTrue(tickets.stream().allMatch(t -> t.getCategoryId() == null));
    TotalPrice totalPrice = ticketReservationManager.totalReservationCostWithVAT(reservationId);
    assertEquals(0, ticketReservationManager.getPendingPayments(event).size());
    PaymentResult confirm = ticketReservationManager.confirm(null, null, event, reservationId, "email@example.com", new CustomerName("full name", "full", "name", event), Locale.ENGLISH, "billing address", totalPrice, Optional.empty(), Optional.of(PaymentProxy.OFFLINE), false, null, null, null);
    assertTrue(confirm.isSuccessful());
    assertEquals(TicketReservation.TicketReservationStatus.OFFLINE_PAYMENT, ticketReservationManager.findById(reservationId).get().getStatus());
    assertEquals(1, ticketReservationManager.getPendingPayments(event).size());
    Date now = new Date();
    Date from = DateUtils.addDays(now, -1);
    Date to = DateUtils.addDays(now, 1);
    // -> no reservations
    assertTrue(ticketReservationRepository.getSoldStatistic(event.getId(), from, to).isEmpty());
    ticketReservationManager.validateAndConfirmOfflinePayment(reservationId, event, new BigDecimal("190.00"), eventAndUsername.getValue());
    // -> 19 tickets reserved
    assertEquals(19, ticketReservationRepository.getSoldStatistic(event.getId(), from, to).get(0).getTicketSoldCount());
    assertEquals(10, eventStatisticsManager.loadModifiedTickets(event.getId(), bounded.getId(), 0, null).size());
    assertEquals(Integer.valueOf(10), eventStatisticsManager.countModifiedTicket(event.getId(), bounded.getId(), null));
    assertEquals(9, eventStatisticsManager.loadModifiedTickets(event.getId(), unbounded.getId(), 0, null).size());
    assertEquals(Integer.valueOf(9), eventStatisticsManager.countModifiedTicket(event.getId(), unbounded.getId(), null));
    assertEquals(TicketReservation.TicketReservationStatus.COMPLETE, ticketReservationManager.findById(reservationId).get().getStatus());
    // -------------------
    TicketReservationModification trForDelete = new TicketReservationModification();
    trForDelete.setAmount(1);
    trForDelete.setTicketCategoryId(unbounded.getId());
    TicketReservationWithOptionalCodeModification modForDelete = new TicketReservationWithOptionalCodeModification(trForDelete, Optional.empty());
    String reservationId2 = ticketReservationManager.createTicketReservation(event, Collections.singletonList(modForDelete), Collections.emptyList(), DateUtils.addDays(new Date(), 1), Optional.empty(), Optional.empty(), Locale.ENGLISH, false);
    ticketReservationManager.confirm(null, null, event, reservationId2, "email@example.com", new CustomerName("full name", "full", "name", event), Locale.ENGLISH, "billing address", totalPrice, Optional.empty(), Optional.of(PaymentProxy.OFFLINE), false, null, null, null);
    assertTrue(ticketReservationManager.findById(reservationId2).isPresent());
    ticketReservationManager.deleteOfflinePayment(event, reservationId2, false);
    Assert.assertFalse(ticketReservationManager.findById(reservationId2).isPresent());
}
Also used : alfio.repository(alfio.repository) java.util(java.util) PaymentProxy(alfio.model.transaction.PaymentProxy) BeforeClass(org.junit.BeforeClass) ZonedDateTime(java.time.ZonedDateTime) RunWith(org.junit.runner.RunWith) PaymentResult(alfio.manager.support.PaymentResult) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) RepositoryConfiguration(alfio.config.RepositoryConfiguration) BigDecimal(java.math.BigDecimal) SpringJUnit4ClassRunner(org.springframework.test.context.junit4.SpringJUnit4ClassRunner) Pair(org.apache.commons.lang3.tuple.Pair) LocalTime(java.time.LocalTime) Before(org.junit.Before) OrganizationRepository(alfio.repository.user.OrganizationRepository) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) IntegrationTestUtil(alfio.test.util.IntegrationTestUtil) Collectors(java.util.stream.Collectors) ConfigurationRepository(alfio.repository.system.ConfigurationRepository) DateUtils(org.apache.commons.lang3.time.DateUtils) Initializer(alfio.config.Initializer) alfio.model(alfio.model) UserManager(alfio.manager.user.UserManager) ContextConfiguration(org.springframework.test.context.ContextConfiguration) LocalDate(java.time.LocalDate) DataSourceConfiguration(alfio.config.DataSourceConfiguration) TestConfiguration(alfio.TestConfiguration) Assert(org.junit.Assert) alfio.model.modification(alfio.model.modification) Assert.assertEquals(org.junit.Assert.assertEquals) Transactional(org.springframework.transaction.annotation.Transactional) PaymentResult(alfio.manager.support.PaymentResult) LocalDate(java.time.LocalDate) BigDecimal(java.math.BigDecimal) Test(org.junit.Test)

Example 5 with OrganizationRepository

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

the class WaitingQueueProcessorIntegrationTest method initSoldOutEvent.

private Pair<String, Event> initSoldOutEvent(boolean withUnboundedCategory) throws InterruptedException {
    int boundedCategorySize = AVAILABLE_SEATS - (withUnboundedCategory ? 1 : 0);
    List<TicketCategoryModification> categories = new ArrayList<>();
    categories.add(new TicketCategoryModification(null, "default", boundedCategorySize, new DateTimeModification(LocalDate.now().minusDays(1), LocalTime.now()), new DateTimeModification(LocalDate.now().plusDays(2), LocalTime.now()), DESCRIPTION, BigDecimal.ZERO, false, "", true, null, null, null, null, null));
    if (withUnboundedCategory) {
        categories.add(new TicketCategoryModification(null, "unbounded", 0, new DateTimeModification(LocalDate.now().minusDays(1), LocalTime.now()), new DateTimeModification(LocalDate.now().plusDays(2), LocalTime.now()), DESCRIPTION, BigDecimal.ZERO, false, "", false, null, null, null, null, null));
    }
    Pair<Event, String> pair = initEvent(categories, organizationRepository, userManager, eventManager, eventRepository);
    Event event = pair.getKey();
    List<TicketCategory> ticketCategories = eventManager.loadTicketCategories(event);
    TicketCategory bounded = ticketCategories.stream().filter(t -> t.getName().equals("default")).findFirst().orElseThrow(IllegalStateException::new);
    List<Integer> boundedReserved = ticketRepository.selectFreeTicketsForPreReservation(event.getId(), 20, bounded.getId());
    assertEquals(boundedCategorySize, boundedReserved.size());
    List<Integer> reserved = new ArrayList<>(boundedReserved);
    String reservationId = UUID.randomUUID().toString();
    ticketReservationRepository.createNewReservation(reservationId, DateUtils.addHours(new Date(), 1), null, Locale.ITALIAN.getLanguage(), event.getId(), event.getVat(), event.isVatIncluded());
    List<Integer> reservedForUpdate = withUnboundedCategory ? reserved.subList(0, 19) : reserved;
    ticketRepository.reserveTickets(reservationId, reservedForUpdate, bounded.getId(), Locale.ITALIAN.getLanguage(), 0);
    if (withUnboundedCategory) {
        TicketCategory unbounded = ticketCategories.stream().filter(t -> t.getName().equals("unbounded")).findFirst().orElseThrow(IllegalStateException::new);
        List<Integer> unboundedReserved = ticketRepository.selectNotAllocatedFreeTicketsForPreReservation(event.getId(), 20);
        assertEquals(1, unboundedReserved.size());
        reserved.addAll(unboundedReserved);
        ticketRepository.reserveTickets(reservationId, reserved.subList(19, 20), unbounded.getId(), Locale.ITALIAN.getLanguage(), 0);
    }
    ticketRepository.updateTicketsStatusWithReservationId(reservationId, Ticket.TicketStatus.ACQUIRED.name());
    // sold-out
    waitingQueueManager.subscribe(event, new CustomerName("Giuseppe Garibaldi", "Giuseppe", "Garibaldi", event), "peppino@garibaldi.com", null, Locale.ENGLISH);
    // we are testing ordering, not concurrency...
    Thread.sleep(100L);
    waitingQueueManager.subscribe(event, new CustomerName("Nino Bixio", "Nino", "Bixio", event), "bixio@mille.org", null, Locale.ITALIAN);
    List<WaitingQueueSubscription> subscriptions = waitingQueueRepository.loadAll(event.getId());
    assertTrue(waitingQueueRepository.countWaitingPeople(event.getId()) == 2);
    assertTrue(subscriptions.stream().allMatch(w -> w.getSubscriptionType().equals(WaitingQueueSubscription.Type.SOLD_OUT)));
    // the following call shouldn't have any effect
    waitingQueueSubscriptionProcessor.distributeAvailableSeats(event);
    assertTrue(waitingQueueRepository.countWaitingPeople(event.getId()) == 2);
    return Pair.of(reservationId, event);
}
Also used : java.util(java.util) BeforeClass(org.junit.BeforeClass) WaitingQueueRepository(alfio.repository.WaitingQueueRepository) TicketReservationRepository(alfio.repository.TicketReservationRepository) RunWith(org.junit.runner.RunWith) Autowired(org.springframework.beans.factory.annotation.Autowired) ActiveProfiles(org.springframework.test.context.ActiveProfiles) ConfigurationManager(alfio.manager.system.ConfigurationManager) EventModification(alfio.model.modification.EventModification) StringUtils(org.apache.commons.lang3.StringUtils) DateTimeModification(alfio.model.modification.DateTimeModification) RepositoryConfiguration(alfio.config.RepositoryConfiguration) BigDecimal(java.math.BigDecimal) SpringJUnit4ClassRunner(org.springframework.test.context.junit4.SpringJUnit4ClassRunner) Pair(org.apache.commons.lang3.tuple.Pair) LocalTime(java.time.LocalTime) AuthorityRepository(alfio.repository.user.AuthorityRepository) Before(org.junit.Before) DateTimeModification.fromZonedDateTime(alfio.model.modification.DateTimeModification.fromZonedDateTime) Collections.emptyMap(java.util.Collections.emptyMap) OrganizationRepository(alfio.repository.user.OrganizationRepository) TicketCategoryModification(alfio.model.modification.TicketCategoryModification) TicketRepository(alfio.repository.TicketRepository) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) EventRepository(alfio.repository.EventRepository) IntegrationTestUtil(alfio.test.util.IntegrationTestUtil) ConfigurationRepository(alfio.repository.system.ConfigurationRepository) DateUtils(org.apache.commons.lang3.time.DateUtils) Initializer(alfio.config.Initializer) alfio.model(alfio.model) UserRepository(alfio.repository.user.UserRepository) UserManager(alfio.manager.user.UserManager) ContextConfiguration(org.springframework.test.context.ContextConfiguration) LocalDate(java.time.LocalDate) DataSourceConfiguration(alfio.config.DataSourceConfiguration) TestConfiguration(alfio.TestConfiguration) ConfigurationKeys(alfio.model.system.ConfigurationKeys) Assert.assertEquals(org.junit.Assert.assertEquals) Transactional(org.springframework.transaction.annotation.Transactional) LocalDate(java.time.LocalDate) DateTimeModification(alfio.model.modification.DateTimeModification) TicketCategoryModification(alfio.model.modification.TicketCategoryModification)

Aggregations

TestConfiguration (alfio.TestConfiguration)8 DataSourceConfiguration (alfio.config.DataSourceConfiguration)8 Initializer (alfio.config.Initializer)8 RepositoryConfiguration (alfio.config.RepositoryConfiguration)8 UserManager (alfio.manager.user.UserManager)8 OrganizationRepository (alfio.repository.user.OrganizationRepository)8 IntegrationTestUtil (alfio.test.util.IntegrationTestUtil)8 BigDecimal (java.math.BigDecimal)8 LocalDate (java.time.LocalDate)8 LocalTime (java.time.LocalTime)8 java.util (java.util)8 DateUtils (org.apache.commons.lang3.time.DateUtils)8 Pair (org.apache.commons.lang3.tuple.Pair)8 BeforeClass (org.junit.BeforeClass)8 Test (org.junit.Test)8 RunWith (org.junit.runner.RunWith)8 Autowired (org.springframework.beans.factory.annotation.Autowired)8 ActiveProfiles (org.springframework.test.context.ActiveProfiles)8 ContextConfiguration (org.springframework.test.context.ContextConfiguration)8 SpringJUnit4ClassRunner (org.springframework.test.context.junit4.SpringJUnit4ClassRunner)8