public async Task CheckLockerCodeAsync()
        {
            var rentalId = await rentalRepository.AddAsync(rental);

            var correctLockerCode = await rentalRepository.CheckLockerCodeAsync(rentalId, rental.LockerCode);

            Assert.True(correctLockerCode);
        }
Exemple #2
0
        public async Task <bool> CheckLockerCodeAsync(Rental rental, CancellationToken cancellationToken = default)
        {
            if (rental.LockerCode == string.Empty || rental.RentalId == Guid.Empty)
            {
                throw new ArgumentNullException(nameof(rental));
            }

            return(await rentalRepository.CheckLockerCodeAsync(rental.RentalId, rental.LockerCode, cancellationToken));
        }