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

Add tests to increase code coverage for 'model' components #132

Merged
merged 9 commits into from
Oct 18, 2020

Conversation

ianyong
Copy link
Member

@ianyong ianyong commented Oct 18, 2020

Changes:

  • Bring code coverage for the 'model' components up to 100%.
  • Update sample data (on initial load of the application).
  • Update TypicalTransactions to be transactions instead of persons.

Related to #115.

To achieve 100% test coverage for Amount
To achieve 100% test coverage for Date
To achieve 100% test coverage for TransactionList
Use more realistic transactions instead of persons
To achieve 100% line coverage for Transaction
To achieve 100% test coverage for FinanceTracker
To achieve 100% test coverage for UserPrefs
@ianyong ianyong added priority.medium 🥈 Todo for current iteration type.testing ⛑️ Add tests/increase coverage labels Oct 18, 2020
@ianyong ianyong added this to the v1.3 milestone Oct 18, 2020
@ianyong ianyong requested a review from a team October 18, 2020 09:23
@codecov-io
Copy link

codecov-io commented Oct 18, 2020

Codecov Report

Merging #132 into master will increase coverage by 1.54%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #132      +/-   ##
============================================
+ Coverage     71.44%   72.99%   +1.54%     
- Complexity      541      556      +15     
============================================
  Files            90       90              
  Lines          1653     1655       +2     
  Branches        161      161              
============================================
+ Hits           1181     1208      +27     
+ Misses          421      397      -24     
+ Partials         51       50       -1     
Impacted Files Coverage Δ Complexity Δ
...s2103_w16_3/finesse/model/util/SampleDataUtil.java 94.11% <100.00%> (+74.11%) 5.00 <3.00> (+4.00)
...s2103_w16_3/finesse/storage/JsonAdaptedIncome.java 97.29% <0.00%> (-2.71%) 9.00% <0.00%> (ø%)
...2103_w16_3/finesse/storage/JsonAdaptedExpense.java 97.29% <0.00%> (-2.71%) 9.00% <0.00%> (ø%)
...6_3/finesse/model/transaction/TransactionList.java 97.14% <0.00%> (+2.85%) 14.00% <0.00%> (+1.00%)
...1s1_cs2103_w16_3/finesse/model/FinanceTracker.java 97.05% <0.00%> (+2.94%) 18.00% <0.00%> (+1.00%)
...3_w16_3/finesse/model/transaction/Transaction.java 100.00% <0.00%> (+3.03%) 16.00% <0.00%> (+1.00%)
...cs2103_w16_3/finesse/commons/core/GuiSettings.java 73.07% <0.00%> (+3.84%) 6.00% <0.00%> (+1.00%)
..._cs2103_w16_3/finesse/model/transaction/Title.java 90.90% <0.00%> (+9.09%) 8.00% <0.00%> (+1.00%)
...cs2103_w16_3/finesse/model/transaction/Amount.java 90.00% <0.00%> (+10.00%) 7.00% <0.00%> (+1.00%)
... and 3 more

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 b636dd9...a277a8a. Read the comment docs.

zhaojj2209
zhaojj2209 previously approved these changes Oct 18, 2020
Copy link

@zhaojj2209 zhaojj2209 left a comment

Choose a reason for hiding this comment

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

LGTM!

To achieve 100% test coverage for SampleDataUtil
Copy link

@zhaojj2209 zhaojj2209 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@yongping827 yongping827 left a comment

Choose a reason for hiding this comment

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

LGTM

@yongping827 yongping827 merged commit 1a702c7 into master Oct 18, 2020
@ianyong ianyong modified the milestones: v1.3, v1.4 Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.medium 🥈 Todo for current iteration type.testing ⛑️ Add tests/increase coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants