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

Show command review #265

Merged
merged 5 commits into from
Nov 7, 2020

Conversation

jiaweiteo
Copy link

Increased test coverage for show command to 90%

@codecov-io
Copy link

Codecov Report

Merging #265 into master will increase coverage by 0.65%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #265      +/-   ##
============================================
+ Coverage     60.60%   61.25%   +0.65%     
- Complexity      823      832       +9     
============================================
  Files           126      126              
  Lines          2894     2891       -3     
  Branches        384      383       -1     
============================================
+ Hits           1754     1771      +17     
+ Misses          976      957      -19     
+ Partials        164      163       -1     
Impacted Files Coverage Δ Complexity Δ
.../java/seedu/address/logic/command/ShowCommand.java 80.00% <0.00%> (+54.19%) 12.00 <0.00> (+7.00)
src/main/java/seedu/address/ui/UiManager.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
.../seedu/address/logic/parser/ShowCommandParser.java 100.00% <100.00%> (+37.50%) 3.00 <0.00> (+1.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 fa8add7...0bf1598. Read the comment docs.

Copy link
Collaborator

@lyeyixian lyeyixian left a comment

Choose a reason for hiding this comment

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

LGTM. Just some nits.

String[] keywords = args.split(" ");
if (keywords.length != ShowCommand.COMMAND_TOKENS) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice way to work around the magic numbers! @timjkong @underthehai


public class ShowCommandTest {

private Model model;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe consider using a stub?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or is it suppose to use original model?

Copy link
Author

Choose a reason for hiding this comment

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

Try out integration testing? haha

@@ -18,12 +45,112 @@ public void execute_show_success() {
}

@Test
public void execute_goto_failure() {
public void execute_showAccommodation_success() {
try {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder why you didn't use the method in CommandTestUtil (assertCommandSuccess(), etc.)?

@jiaweiteo jiaweiteo merged commit 59074d7 into AY2021S1-CS2103-T14-3:master Nov 7, 2020
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.

None yet

3 participants