public async Task <ProducerCharge> GetCharge(ChargeBand chargeBand) { var currentChargeBandAmount = await producerChargeCalculatorDataAccess.FetchCurrentChargeBandAmount(chargeBand); return(new ProducerCharge() { ChargeBandAmount = currentChargeBandAmount, Amount = currentChargeBandAmount.Amount }); }
public async void GetCharge_GivenChargeBand_ChargeBandAmountShouldBeRetrieved(ChargeBand band) { await fetchProducerCharge.GetCharge(band); A.CallTo(() => producerChargeCalculatorDataAccess.FetchCurrentChargeBandAmount(band)).MustHaveHappened(Repeated.Exactly.Once); }