public async Task CalculateTaxesForZeroValueOrderTest() { var taxJarService = new TaxJarCalculator(); var order = new Models.Order() { FromState = "FL", Country = "US", ToState = "FL", ToZip = "33458" }; var result = await taxJarService.CalculateTaxesForOrder(order); Assert.IsTrue(result == default, "Tax should be zero"); }
public async Task CalculateTaxesForOrderTest() { var taxJarService = new TaxJarCalculator(); var order = new Models.Order() { FromState = "FL", Country = "US", ToState = "FL", ToZip = "33458" }; order.AddProduct(new Product() { Price = 10m }); var result = await taxJarService.CalculateTaxesForOrder(order); Assert.IsTrue(result != default, "Tax should not be zero"); Assert.IsTrue(result == 0.65m, "Tax on $10 should be 65c"); }