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 unit tests for allocate, deallocate, reallocate commands and JsonAdaptedRoom #106

Merged
merged 10 commits into from
Oct 25, 2020

Conversation

jetnew
Copy link

@jetnew jetnew commented Oct 25, 2020

What this does

This PR adds testing support for allocate, deallocate, reallocate commands and JsonAdaptedRoom. It adds unit tests for AllocateCommand, DeallocateCommand, ReallocateCommand and JsonAdaptedRoom.

Part of #13, #14 and #18.

How to test

N/A

Notes

  1. Support for integration tests for AllocateCommand, DeallocateCommand and ReallocateCommand have to be added.

@jetnew jetnew added the type.Chore Something that needs to be done, but not a story, bug, or an epic. e.g. Move testing code into a new label Oct 25, 2020
@jetnew jetnew added this to the v1.3 milestone Oct 25, 2020
@codecov-io
Copy link

Codecov Report

Merging #106 into master will increase coverage by 6.25%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #106      +/-   ##
============================================
+ Coverage     63.04%   69.30%   +6.25%     
- Complexity      732      788      +56     
============================================
  Files           127      127              
  Lines          2690     2691       +1     
  Branches        331      331              
============================================
+ Hits           1696     1865     +169     
+ Misses          903      716     -187     
- Partials         91      110      +19     
Impacted Files Coverage Δ Complexity Δ
...in/java/seedu/resireg/storage/JsonAdaptedRoom.java 97.43% <100.00%> (+97.43%) 9.00 <0.00> (+9.00)
src/main/java/seedu/resireg/model/room/Room.java 70.27% <0.00%> (+2.70%) 18.00% <0.00%> (+1.00%)
...va/seedu/resireg/model/room/roomtype/RoomType.java 90.90% <0.00%> (+9.09%) 8.00% <0.00%> (+1.00%)
src/main/java/seedu/resireg/model/room/Floor.java 90.00% <0.00%> (+10.00%) 7.00% <0.00%> (+1.00%)
...main/java/seedu/resireg/model/room/RoomNumber.java 90.00% <0.00%> (+10.00%) 7.00% <0.00%> (+1.00%)
...ava/seedu/resireg/model/allocation/Allocation.java 43.33% <0.00%> (+10.00%) 8.00% <0.00%> (+2.00%)
...resireg/model/allocation/UniqueAllocationList.java 55.76% <0.00%> (+11.53%) 16.00% <0.00%> (+2.00%)
...rc/main/java/seedu/resireg/model/ModelManager.java 86.89% <0.00%> (+12.41%) 47.00% <0.00%> (+5.00%)
src/main/java/seedu/resireg/model/ResiReg.java 90.27% <0.00%> (+13.88%) 28.00% <0.00%> (+4.00%)
.../seedu/resireg/logic/commands/AllocateCommand.java 80.55% <0.00%> (+75.00%) 9.00% <0.00%> (+8.00%)
... and 4 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 8f58e2d...3bcbcc8. Read the comment docs.

Copy link

@chloelee767 chloelee767 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

@Lysire Lysire left a comment

Choose a reason for hiding this comment

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

LGTM!

@Lysire Lysire merged commit 4b2f67c into master Oct 25, 2020
@jetnew jetnew deleted the jetnew/allocate-command-tests branch October 25, 2020 10:15
@jetnew jetnew restored the jetnew/allocate-command-tests branch October 25, 2020 10:15
@jetnew jetnew self-assigned this Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type.Chore Something that needs to be done, but not a story, bug, or an epic. e.g. Move testing code into a new
Projects
None yet
4 participants