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 'view' command #127

Merged
merged 11 commits into from
Oct 25, 2020
Merged

Add 'view' command #127

merged 11 commits into from
Oct 25, 2020

Conversation

xuey0ng
Copy link

@xuey0ng xuey0ng commented Oct 24, 2020

Closes #112

@codecov-io
Copy link

codecov-io commented Oct 24, 2020

Codecov Report

Merging #127 into master will decrease coverage by 0.35%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #127      +/-   ##
============================================
- Coverage     46.54%   46.19%   -0.36%     
  Complexity      703      703              
============================================
  Files           119      121       +2     
  Lines          2892     2914      +22     
  Branches        391      394       +3     
============================================
  Hits           1346     1346              
- Misses         1374     1396      +22     
  Partials        172      172              
Impacted Files Coverage Δ Complexity Δ
src/main/java/chopchop/commons/util/Strings.java 100.00% <ø> (ø) 2.00 <0.00> (ø)
...main/java/chopchop/logic/commands/ViewCommand.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...main/java/chopchop/logic/parser/CommandParser.java 82.22% <0.00%> (-1.87%) 19.00 <0.00> (ø)
...pchop/logic/parser/commands/FindCommandParser.java 50.00% <ø> (ø) 5.00 <0.00> (ø)
...pchop/logic/parser/commands/ViewCommandParser.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
src/main/java/chopchop/ui/DisplayNavigator.java 0.00% <ø> (ø) 1.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 5e53b10...64258e4. Read the comment docs.

Comment on lines 40 to 42
.findRecipeWithName(this.item.getName())
.orElseThrow(() -> new CommandException(String.format(MESSAGE_RECIPE_NOT_FOUND,
this.item.getName())));

Choose a reason for hiding this comment

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

shouldn't this also check if the item was a number? wouldn't you want to let the user do view #3 for example

Comment on lines 27 to 29
if (!args.getCommand().equals(commandName)) {
return Result.error("invalid command '%s' (expected '%s')", args.getCommand(), commandName);
}

Choose a reason for hiding this comment

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

I changed all of these to assertions a while ago, this should probably be changed too

@xuey0ng xuey0ng marked this pull request as draft October 24, 2020 13:47
@xuey0ng xuey0ng marked this pull request as ready for review October 25, 2020 10:48
@zhiayang
Copy link

👍

@zhiayang zhiayang merged commit 4a2c3d4 into master Oct 25, 2020
@xuey0ng xuey0ng added this to the v1.3 milestone Oct 25, 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.

Users should be able to view recipe using a command
3 participants