public void CreateInvoiceItem_OneTimePlusPremiumEach_RegularEquipment(int rentDays)
        {
            // Arrange
            var rentedItem = new EquipmentItem {
                EquipmentType = EquipmentType.Regular, RentalDays = rentDays
            };
            var handler = new GenerateInvoiceMessageHandler(_options, _logger);

            // Act
            var result = handler.CreateInvoiceItem(rentedItem);

            // Assert
            Assert.Equal(_options.Value.OneTimeFee + rentDays * _options.Value.PremiumFee, result.RentalPrice);
        }
        public void CreateInvoiceItem_PremiumThreePlusRegularEach_SpecializedEquipment(int rentDays)
        {
            // Arrange
            var rentedItem = new EquipmentItem {
                EquipmentType = EquipmentType.Specialized, RentalDays = rentDays
            };
            var handler = new GenerateInvoiceMessageHandler(_options, _logger);

            // Act
            var result = handler.CreateInvoiceItem(rentedItem);

            // Assert
            var expected = 3 * _options.Value.PremiumFee + (rentDays - 3) * _options.Value.RegularFee;

            Assert.Equal(expected, result.RentalPrice);
        }
        public void GetLoyalityPoints_CorrectLoyalityPoints_AnyEquipmentAnyDays(EquipmentType type, int rentDays,
                                                                                int expected)
        {
            // Arrange
            var rentedItems = new List <EquipmentItem> {
                new EquipmentItem {
                    EquipmentType = type, RentalDays = rentDays
                }
            };
            var handler = new GenerateInvoiceMessageHandler(_options, _logger);

            // Act
            var result = handler.GetLoyalityPoints(rentedItems);

            // Assert
            Assert.Equal(expected, result);
        }