public void ShoulThrowArgumentExceptionWhenNoPremiumBaseForRequestedVehicleType() { var vehicleType = VehicleType.Car; var configurationRepositoryMock = new Mock<IConfigurationStorage>(); configurationRepositoryMock.SetupGet(x => x.VehicleTypeBasePremiums) .Returns(new Dictionary<VehicleType, decimal>()); var service = new ConfigurationgService(configurationRepositoryMock.Object) as IConfigurationgService; service.GetInsuranceBasePremium(vehicleType); }
public void ShouldReturn800BasePremiumForCarVenicleType() { var expectedResult = 800m; var vehicleType = VehicleType.Car; var configurationRepository = new ConfigurationStorageFake() as IConfigurationStorage; var service = new ConfigurationgService(configurationRepository) as IConfigurationgService; var result = service.GetInsuranceBasePremium(vehicleType); Assert.AreEqual(expectedResult, result); }