Пример #1
0
 public UserCartDataService(UserCartRepository userCartRepository,
                            UserCartItemsRepository userCartItemsRepository,
                            UserCartItemRentalsRepository userCartItemRentalsRepository,
                            ItemRepository itemRepository,
                            ItemRentalDetailsRepository itemRentalDetailsRepository)
 {
     this.userCartRepository            = userCartRepository ?? throw new ArgumentNullException(nameof(userCartRepository));
     this.userCartItemsRepository       = userCartItemsRepository ?? throw new ArgumentNullException(nameof(userCartItemsRepository));
     this.userCartItemRentalsRepository = userCartItemRentalsRepository ?? throw new ArgumentNullException(nameof(userCartItemRentalsRepository));
     this.itemRepository = itemRepository ?? throw new ArgumentNullException(nameof(itemRepository));
     this.itemRentalDetailsRepository = itemRentalDetailsRepository ?? throw new ArgumentNullException(nameof(itemRentalDetailsRepository));
 }
Пример #2
0
 public UserCartItemsRepositoryTests()
 {
     userCartItems           = CreateUserCartItems();
     userCartItemsRepository = GetInMemoryUserCartRepository();
 }