Closed MatteoPiovanelli-Laser closed 6 years ago
As some of my other PRs have been pulled, I am sure more tests are now failing. I'll give this my attention in the near future
I finally got around to this. A PR will be ready momentarily. As I fixed the test I found a couple places in the module where it was trequired to make small changes to handle culture formatting of strings.
Tests failing:
TaskByZipTests.cs: TaxDoesNotApplyToNonMatchingZip() RightTaxAppliesToTabRates() RightTaxAppliesToCsvRates() These tests fail when calling
cart.Taxes()
, because inZipCodeTaxPart.cs
theGetRates()
method doesConvert.ToDouble(rateSplit[1])
. This has issues related to culture formatting of the string. In the test, that string comes in as ".07": that makes no sense in the it-IT culture, thus the conversion fails and throws an exception.UspsServiceInternationalTests.cs: InternationalRequestDocumentIsCorrectlyBuilt() fails on
Assert.That(package.Element("ValueOfContents").Value, Is.EqualTo("1030.54"));
because of culture formatting of that value. In it-IT culture it is "1030,54". InternationalServicePricesReturnsInternationalPrices() fails on theAssert.That(prices, ...)
. This again has to do with culture formatting, as shipping options inuspsService.prices
have prices like 11705 where it should be 117.05. InternationalServicePricesWithCertificateOfMailingYieldsBumpedPrice() InternationalServicePricesWithConfirmationYieldsBumpedPrice() InternationalServicePricesWithExclusionAndValidationExpressionsYieldsTheRightMethods() InternationalServicePricesWithExclusionExpressionExcludesMatchingMethods() InternationalServicePricesWithInsuranceYieldsBumpedPrice() InternationalServicePricesWithRegisteredMailYieldsBumpedPrice() InternationalServicePricesWithReturnReceiptYieldsBumpedPrice() InternationalServicePricesWithSeveralOptionsYieldsCombinedPrice() InternationalServicePricesWithValidationExpressionSelectsMatchingMethods() fails for the same issue on culture formatting of prices.UspsServiceInternationalTests.cs: Many tests here fail for the same reasons as the ones above.
The failing tests above highlight some issues that the project has in globalization.
ProductAttributeTests.cs: Some tests fail because of the changes made in #91 to the
ValidateAttribute
method ofProductAttributesPartDriver
. Products are added that are not valid. The fix to this is in the next iteration of #103. It's a change on line 70 of the driver, where I should be passing the attributes from the product to theGetAttributes
method, rather than those from the dictionary.