public void FromChargeConfigurations_ConfigurationsWithBaseCharges_ShouldSetCorrectBaseCharges() { // Arrange var deminimisBaseCharges = new List <ChargeName> { "Item" }; var chargeConfigurations = new List <ChargeConfiguration> { new RateBasedChargeConfiguration("Duty", "EUR0", new List <ChargeName> { "Item" }), new RateBasedChargeConfiguration("Vat", "EUR0", new List <ChargeName> { "Item", "Duty" }), new RateBasedChargeConfiguration("Fee", "EUR0", new List <ChargeName> { "Item", "Duty", "Vat" }) }; // Act var configurations = new CalculatorConfiguration(chargeConfigurations, deminimisBaseCharges) .CalculationRanges .Single() .ChargeConfigurations; // Assert configurations.Single(x => x.ChargeName.Value == "Duty") .As <RateBasedChargeConfiguration>().BaseChargeConfigurations.Should() .BeEmpty(); configurations.Single(x => x.ChargeName.Value == "Vat") .As <RateBasedChargeConfiguration>().BaseChargeConfigurations.Should() .OnlyContain(x => x.ChargeName.Value == "Duty"); configurations.Single(x => x.ChargeName.Value == "Fee") .As <RateBasedChargeConfiguration>().BaseChargeConfigurations.Should() .ContainSingle(x => x.ChargeName.Value == "Duty").And .ContainSingle(x => x.ChargeName.Value == "Vat"); }