public void BaseFeeTest(int distance, double expectFee) { BaseFee baseFee = new BaseFee(); var fee = baseFee.GetFee(distance); Assert.Equal(expectFee, fee); }
public override double ApplyFee(BaseFee o, double amount) { if (o is Fee) { FeesManager feeCrypto = new FeesManager(_context); var currentFeeCrypto = Convert.ToDouble((int)Math.Round((double)(Convert.ToDouble(feeCrypto.GetAllFees()) / 100) * amount)); return(currentFeeCrypto); } else if (o is FlatRateFee) { FeesManager flatRateFee = new FeesManager(_context); var flatRate = flatRateFee.GetAllFlatRateFees(); return(flatRate); } return(0); }
public virtual double ApplyFee(BaseFee o, double amount) { return(0); }