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

Created Junit Test Cases for Label Command #131

Merged
merged 11 commits into from
Mar 27, 2019

Conversation

melpulomas
Copy link

No description provided.

@melpulomas melpulomas added this to To Do in Labelling Storage via automation Mar 27, 2019
@melpulomas melpulomas added this to the v1.3 milestone Mar 27, 2019
@melpulomas melpulomas added the priority.High Must do label Mar 27, 2019

LabelCommand labelCommand = new LabelCommand(INDEX_FIRST_MEDICINE, new FileName(DEFAULT_FILENAME));
labelCommand.execute(model, commandHistory);
File printedFile = new File("./PDF/" + "to_print.pdf");
Copy link

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"
Copy link

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

Copy link

@flxffy flxffy left a 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

@flxffy flxffy merged commit baa6730 into CS2103-AY1819S2-T12-3:master Mar 27, 2019
@melpulomas melpulomas moved this from To Do to Done in Labelling Storage Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants