-
Notifications
You must be signed in to change notification settings - Fork 15
Fix Ocelot.Data.Currency
functions not working with negative Cents
values
#227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In this commit we add test cases for negative `Cents` value and a property test for the interaction between `parseCentsFromDollarStr` and `formatCentsToStrDollars`. These tests are failing at the moment and we fix the code and get them to pass in the next commit.
Previously these functions did not work properly with negative `Cents` values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@arthurxavierx Don't forget to bump version like this and make a release. |
@boygao1992 Do you know why the CircleCI build hasn't finished yet? |
@arthurxavierx I just did that for you creating a new branch |
@boygao1992 Oh it seems like the original branch got built and already merged for some reason 😶 Thank you! |
Nvm, since both branches are on the same commit. That CI passing triggered the auto merge. |
No problem! |
What does this pull request do?
The
Ocelot.Data.Currency.formatCentsToStrDollars
andOcelot.Data.Currency.parseCentsFromDollarStr
did not work with negativeCents
values. We fix that by changing their definitions and adding test cases to cover the intended behavior.Where should the reviewer start?
Commit-by-commit.
How should this be manually tested?
There's no need for manual testing; the automated tests should be enough.