-
Notifications
You must be signed in to change notification settings - Fork 4
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
Created Junit Test Cases for Label Command #131
Conversation
|
||
LabelCommand labelCommand = new LabelCommand(INDEX_FIRST_MEDICINE, new FileName(DEFAULT_FILENAME)); | ||
labelCommand.execute(model, commandHistory); | ||
File printedFile = new File("./PDF/" + "to_print.pdf"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a good idea to use .
for current directory. consider getting the full file path from the system instead
String medicineCompany = medicineToPrint.getCompany().toString(); | ||
String medicineTags = medicineToPrint.getTags().toString(); | ||
|
||
String information = (medicineName + "\n" + medicineCompany + "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using String.join
. https://stackoverflow.com/a/26195047
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat work good code
No description provided.