Ejemplo n.º 1
0
        public async Task CheckLockerCodeAsync()
        {
            var rentalId = await rentalRepository.AddAsync(rental);

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

            Assert.True(correctLockerCode);
        }
Ejemplo n.º 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));
        }