Search in sources :

Example 1 with FeeFineFacade

use of org.folio.circulation.services.FeeFineFacade in project mod-circulation by folio-org.

the class OverdueFineServiceTest method setUp.

@BeforeEach
public void setUp() {
    overdueFinePolicyRepository = mock(OverdueFinePolicyRepository.class);
    accountRepository = mock(AccountRepository.class);
    itemRepository = mock(ItemRepository.class);
    feeFineOwnerRepository = mock(FeeFineOwnerRepository.class);
    feeFineRepository = mock(FeeFineRepository.class);
    overduePeriodCalculatorService = mock(OverduePeriodCalculatorService.class);
    UserRepository userRepository = mock(UserRepository.class);
    feeFineActionRepository = mock(FeeFineActionRepository.class);
    scheduledNoticesRepository = mock(ScheduledNoticesRepository.class);
    servicePointRepository = mock(ServicePointRepository.class);
    FeeFineService feeFineService = mock(FeeFineService.class);
    FeeFineFacade feeFineFacade = new FeeFineFacade(accountRepository, feeFineActionRepository, userRepository, servicePointRepository, feeFineService);
    overdueFineService = new OverdueFineService(overdueFinePolicyRepository, itemRepository, feeFineOwnerRepository, feeFineRepository, scheduledNoticesRepository, overduePeriodCalculatorService, feeFineFacade);
    when(userRepository.getUser(any(String.class))).thenReturn(completedFuture(succeeded(LOGGED_IN_USER)));
}
Also used : FeeFineFacade(org.folio.circulation.services.FeeFineFacade) FeeFineOwnerRepository(org.folio.circulation.infrastructure.storage.feesandfines.FeeFineOwnerRepository) FeeFineActionRepository(org.folio.circulation.infrastructure.storage.feesandfines.FeeFineActionRepository) AccountRepository(org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository) ScheduledNoticesRepository(org.folio.circulation.infrastructure.storage.notices.ScheduledNoticesRepository) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) ItemRepository(org.folio.circulation.infrastructure.storage.inventory.ItemRepository) FeeFineRepository(org.folio.circulation.infrastructure.storage.feesandfines.FeeFineRepository) UserRepository(org.folio.circulation.infrastructure.storage.users.UserRepository) FeeFineService(org.folio.circulation.services.feefine.FeeFineService) OverdueFinePolicyRepository(org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with FeeFineFacade

use of org.folio.circulation.services.FeeFineFacade in project mod-circulation by folio-org.

the class CheckInProcessAdapter method newInstance.

public static CheckInProcessAdapter newInstance(Clients clients, ItemRepository itemRepository, UserRepository userRepository, LoanRepository loanRepository, RequestRepository requestRepository, RequestQueueRepository requestQueueRepository) {
    final var itemFinder = new ItemByBarcodeInStorageFinder(itemRepository);
    final SingleOpenLoanForItemInStorageFinder singleOpenLoanFinder = new SingleOpenLoanForItemInStorageFinder(loanRepository, userRepository, true);
    final var overdueFineService = new OverdueFineService(new OverdueFinePolicyRepository(clients), itemRepository, new FeeFineOwnerRepository(clients), new FeeFineRepository(clients), ScheduledNoticesRepository.using(clients), new OverduePeriodCalculatorService(new CalendarRepository(clients), new LoanPolicyRepository(clients)), new FeeFineFacade(clients));
    return new CheckInProcessAdapter(itemFinder, singleOpenLoanFinder, new LoanCheckInService(), requestQueueRepository, new UpdateItem(itemRepository), UpdateRequestQueue.using(clients, requestRepository, requestQueueRepository), loanRepository, new ServicePointRepository(clients), userRepository, new AddressTypeRepository(clients), new LogCheckInService(clients), overdueFineService, FeeFineScheduledNoticeService.using(clients), new LostItemFeeRefundService(clients, itemRepository, userRepository, loanRepository), new EventPublisher(clients.pubSubPublishingService()));
}
Also used : FeeFineFacade(org.folio.circulation.services.FeeFineFacade) EventPublisher(org.folio.circulation.services.EventPublisher) FeeFineOwnerRepository(org.folio.circulation.infrastructure.storage.feesandfines.FeeFineOwnerRepository) CalendarRepository(org.folio.circulation.infrastructure.storage.CalendarRepository) OverdueFineService(org.folio.circulation.domain.OverdueFineService) ItemByBarcodeInStorageFinder(org.folio.circulation.storage.ItemByBarcodeInStorageFinder) LostItemFeeRefundService(org.folio.circulation.services.LostItemFeeRefundService) ServicePointRepository(org.folio.circulation.infrastructure.storage.ServicePointRepository) FeeFineRepository(org.folio.circulation.infrastructure.storage.feesandfines.FeeFineRepository) OverduePeriodCalculatorService(org.folio.circulation.domain.OverduePeriodCalculatorService) SingleOpenLoanForItemInStorageFinder(org.folio.circulation.storage.SingleOpenLoanForItemInStorageFinder) UpdateItem(org.folio.circulation.domain.UpdateItem) AddressTypeRepository(org.folio.circulation.infrastructure.storage.users.AddressTypeRepository) LoanPolicyRepository(org.folio.circulation.infrastructure.storage.loans.LoanPolicyRepository) LogCheckInService(org.folio.circulation.services.LogCheckInService) LoanCheckInService(org.folio.circulation.domain.LoanCheckInService) OverdueFinePolicyRepository(org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository)

Aggregations

ServicePointRepository (org.folio.circulation.infrastructure.storage.ServicePointRepository)2 FeeFineOwnerRepository (org.folio.circulation.infrastructure.storage.feesandfines.FeeFineOwnerRepository)2 FeeFineRepository (org.folio.circulation.infrastructure.storage.feesandfines.FeeFineRepository)2 OverdueFinePolicyRepository (org.folio.circulation.infrastructure.storage.loans.OverdueFinePolicyRepository)2 FeeFineFacade (org.folio.circulation.services.FeeFineFacade)2 LoanCheckInService (org.folio.circulation.domain.LoanCheckInService)1 OverdueFineService (org.folio.circulation.domain.OverdueFineService)1 OverduePeriodCalculatorService (org.folio.circulation.domain.OverduePeriodCalculatorService)1 UpdateItem (org.folio.circulation.domain.UpdateItem)1 CalendarRepository (org.folio.circulation.infrastructure.storage.CalendarRepository)1 AccountRepository (org.folio.circulation.infrastructure.storage.feesandfines.AccountRepository)1 FeeFineActionRepository (org.folio.circulation.infrastructure.storage.feesandfines.FeeFineActionRepository)1 ItemRepository (org.folio.circulation.infrastructure.storage.inventory.ItemRepository)1 LoanPolicyRepository (org.folio.circulation.infrastructure.storage.loans.LoanPolicyRepository)1 ScheduledNoticesRepository (org.folio.circulation.infrastructure.storage.notices.ScheduledNoticesRepository)1 AddressTypeRepository (org.folio.circulation.infrastructure.storage.users.AddressTypeRepository)1 UserRepository (org.folio.circulation.infrastructure.storage.users.UserRepository)1 EventPublisher (org.folio.circulation.services.EventPublisher)1 LogCheckInService (org.folio.circulation.services.LogCheckInService)1 LostItemFeeRefundService (org.folio.circulation.services.LostItemFeeRefundService)1