Skip to content
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

Fix large quantity bugs #215

Merged

Conversation

hakujitsu
Copy link

@hakujitsu hakujitsu commented Oct 31, 2020

Closes #211

Changes Made

  • Add additional validation for Unit Price and Quantity to ensure a max value of 10 million
  • Amend existing test cases for Unit Price and Quantity
  • Add test cases for parsing Sale related fields in parserUtil
  • Refactor parsing methods for Unit Price and Quantity
  • Fix documentation to specify the maximum value of Unit Price and Quantity
  • Add dollar sign to UnitPrice toString method

Screenshot 2020-11-01 at 4 42 47 AM

Screenshot 2020-11-01 at 4 41 50 AM

@hakujitsu hakujitsu added this to the v1.4 milestone Oct 31, 2020
@codecov-io
Copy link

codecov-io commented Oct 31, 2020

Codecov Report

Merging #215 into master will increase coverage by 0.06%.
The diff coverage is 91.17%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #215      +/-   ##
============================================
+ Coverage     71.50%   71.57%   +0.06%     
- Complexity     1319     1324       +5     
============================================
  Files           181      181              
  Lines          4422     4425       +3     
  Branches        624      623       -1     
============================================
+ Hits           3162     3167       +5     
- Misses         1041     1043       +2     
+ Partials        219      215       -4     
Impacted Files Coverage Δ Complexity Δ
src/main/java/seedu/address/model/sale/Sale.java 86.88% <0.00%> (ø) 26.00 <0.00> (ø)
.../main/java/seedu/address/model/sale/UnitPrice.java 81.81% <80.00%> (+6.81%) 16.00 <8.00> (+3.00)
...in/java/seedu/address/logic/parser/ParserUtil.java 97.47% <100.00%> (+0.08%) 40.00 <0.00> (ø)
...c/main/java/seedu/address/model/sale/Quantity.java 80.00% <100.00%> (+2.22%) 8.00 <4.00> (+2.00)
.../java/seedu/address/model/util/SampleDataUtil.java 37.50% <100.00%> (ø) 2.00 <0.00> (ø)
...in/java/seedu/address/storage/JsonAdaptedSale.java 98.14% <100.00%> (ø) 12.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ecaca2d...31b42fe. Read the comment docs.

@hakujitsu hakujitsu marked this pull request as ready for review October 31, 2020 20:49
Copy link

@Asthenosphere Asthenosphere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works well, good to merge!

src/main/java/seedu/address/model/sale/Quantity.java Outdated Show resolved Hide resolved
src/test/java/seedu/address/model/sale/UnitPriceTest.java Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PE-D] App does not respond to large integers input
3 participants