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

[User Story] As a Developer, I want better unit tests on logical classes to reduce the chance of re-introducing a bug #30

Open
srjheam opened this issue Nov 27, 2020 · 7 comments · Fixed by #29 · May be fixed by #35
Open
Assignees
Labels
enhancement New feature or request

Comments

@srjheam
Copy link

srjheam commented Nov 27, 2020

As previously discussed in #29, improving tests and reducing code repetition is increasingly necessary.

@srjheam srjheam added the enhancement New feature or request label Nov 27, 2020
@srjheam srjheam self-assigned this Nov 27, 2020
@nickmartin1ee7 nickmartin1ee7 changed the title [User Story] As a Developer, I want better tests [User Story] As a Developer, I want better unit tests on logical classes to reduce the chance of re-introducing a bug Nov 28, 2020
@nickmartin1ee7
Copy link
Member

A unit test where attempting to add two projects would be beneficial.

@srjheam
Copy link
Author

srjheam commented Nov 28, 2020

A unit test where attempting to add two projects would be beneficial.

Thanks, I'll make sure to do that.

@nickmartin1ee7 nickmartin1ee7 linked a pull request Nov 30, 2020 that will close this issue
@nickmartin1ee7 nickmartin1ee7 self-assigned this Nov 30, 2020
@srjheam
Copy link
Author

srjheam commented Nov 30, 2020

I was basing my tests on Code2Gether-Discord-Bot.Library.Models.ProjectManager class but this class is always called by Code2Gether-Discord-Bot.Library.BusinessLogic namespace's classes, so @nickmartin1ee7 I'd to know whether should I basing my tests in each BusinessLogic classes, ProjectManager classes or both?

@nickmartin1ee7
Copy link
Member

Specifically I am testing the logic for the commands in #29.
However, ProjectManager should probably have tests too. But that is something that can be improved in a different branch for this story.

@srjheam
Copy link
Author

srjheam commented Nov 30, 2020

ATM I'm writing the tests for the Model.ProjectManager class and refactoring the way to create fake/mock/stub objects.
I'm gonna share my work soon.

@srjheam
Copy link
Author

srjheam commented Nov 30, 2020

Why was this problem closed, @nickmartin1ee7? I thought it was about refactoring all the tests, at least I was doing it.

@nickmartin1ee7
Copy link
Member

Closed automatically. Reopening.

@srjheam srjheam linked a pull request Dec 1, 2020 that will close this issue
@nickmartin1ee7 nickmartin1ee7 added this to To do in Code2Gether-Discord-Bot via automation Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants