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 tests for quests, topics and greeting #303

Merged
merged 2 commits into from
Nov 5, 2020

Conversation

wilinetan
Copy link
Collaborator

@wilinetan wilinetan commented Nov 5, 2020

Fixes #168

@wilinetan wilinetan added this to the v1.4 milestone Nov 5, 2020
@wilinetan wilinetan changed the title Add tests Add tests for quests, topics and greeting Nov 5, 2020
@wilinetan wilinetan added type.Task Something that needs to be done, but not a story, bug, or an epic. e.g. Move test priority.Medium severity.Low A flaw that is unlikely to affect normal operations of the product. Appears only very rarely. labels Nov 5, 2020
Copy link
Collaborator

@ngzhenteng ngzhenteng left a comment

Choose a reason for hiding this comment

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

Great additions, thank you! LGTM

@@ -18,6 +20,8 @@ public Topic() {
* @param outline outline of Topic
*/
public Topic(String week, String outline) {
requireNonNull(week);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great protective measure!

}

@Test
void getGreeting() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps this test method signature could be setGreeting_validString_success()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍

private final List<Quest> questListTest = new ArrayList<>();

@Test
void add_nullQuest_throwsNullPointerException() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This type of checking is indeed really important, thank you for writing these tests cases!

@wilinetan wilinetan merged commit 1ecaafd into AY2021S1-CS2103T-W11-2:master Nov 5, 2020
@wilinetan wilinetan deleted the tests branch November 8, 2020 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.Medium severity.Low A flaw that is unlikely to affect normal operations of the product. Appears only very rarely. type.Task Something that needs to be done, but not a story, bug, or an epic. e.g. Move test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update quest related tests to include ungraded quests
2 participants