public void DistanceRule_CalculatePrice_WhenDistanceIsBetween10And50_ShoulldReturn1248() { var rule = new DistanceRule(); var order = new Models.Order { CustomerId = Guid.NewGuid(), Distance = 20 }; rule.CalculatePrice(order); Assert.AreEqual(1248.75, order.Price); }
public void DistanceRule_CalculatePrice_WhenDistanceIsGreaterThan50_ShoulldReturnCalculatedValue() { var rule = new DistanceRule(); var order = new Models.Order { CustomerId = Guid.NewGuid(), Distance = 51 }; rule.CalculatePrice(order); Assert.AreEqual(1249, order.Price); }
public void DistanceRule_CalculatePrice_WhenDistanceIsLessThan10_ShoulldReturn1092() { var rule = new DistanceRule(); var order = new Models.Order { CustomerId = Guid.NewGuid(), Distance = 5 }; rule.CalculatePrice(order); Assert.AreEqual(1098.9, order.Price); }