public void ExhibitSummary_Tests() { const string expectedResult = "Tipo do Carro: Motor Home\r\n" + "Quantidade de diárias: 2\r\n" + "Valor total das diárias: R$ 600,00\r\n" + "Estimativa de quilometragem: R$ 552,50\r\n" + "Valores de todos os adicionais: \r\n" + "GPS: R$ 35,00\r\n" + "Geladeira: R$ 250,00\r\n" + "Valor total do aluguel: R$ 1.437,50\r\n"; var rentals = new List <IRental>() { rentalSelection .MotorHomeRental(850, 2) .RentVehicule <MotorHome>() .AddFeature <GpsFeature>() .AddFeature <RefrigeratorFeature>() }; var summary = rentalReport .With(rentals) .CalculateAllRentalFees() .ExhibitSummary(); Assert.AreEqual(expectedResult, summary); }
public void MotorHomeRental_Tests() { var actualResult = rentalSelection.MotorHomeRental(It.IsAny <decimal>(), It.IsAny <int>()); Assert.IsInstanceOf <Rental>(actualResult); availableRentalSelectionMock.Verify(x => x.GetCarAvailableRentals(), Times.Never); availableRentalSelectionMock.Verify(x => x.GetCarRentalAvailableFeatures(), Times.Never); availableRentalSelectionMock.Verify(x => x.GetMotorHomeAvailableRentals(), Times.Once); availableRentalSelectionMock.Verify(x => x.GetMotorHomeRentalAvailableFeatures(), Times.Once); }