public void Calculates_Shipping_Cost_For_International(Cart cart, double low, double high) { var sut = new ShippingCalculator(); var result = sut.CalculateShippingCost(cart); result.Should().BeInRange(low, high); }
public void CalculateShippingCost_NoItems_Return0(Address source, Address destination) { var target = new ShippingCalculator(source); var cart = new CartBuilder() .WithShippingAddress(destination) .Build(); var result = target.CalculateShippingCost(cart); Assert.Equal(0, result); }
public void CalculateShippingCost_NoItems_Return0(Address source, Address destination) { // We could have used auto mocking container here as well, however at the moment this initialization is simple as it is var target = new ShippingCalculator(source); var cart = new CartBuilder() .WithShippingAddress(destination) .Build(); var result = target.CalculateShippingCost(cart); Assert.Equal(0, result); }