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)));
}
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()));
}
Aggregations