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 unit test for the CsvContentExtractionHelper #1396

Closed
nya-elimu opened this issue Aug 15, 2021 · 6 comments · Fixed by #1592
Closed

Add unit test for the CsvContentExtractionHelper #1396

nya-elimu opened this issue Aug 15, 2021 · 6 comments · Fixed by #1592
Assignees
Labels
good first issue Good for newcomers

Comments

@nya-elimu
Copy link
Member

Add unit test for extracting content from the CSV files that happens on application launch. By having unit tests for this, a developer will be notified sooner when introducing breaking changes.

@nya-elimu nya-elimu added the good first issue Good for newcomers label Aug 15, 2021
@vrudas
Copy link
Contributor

vrudas commented Jun 27, 2022

Hi @nya-elimuai as this class contains a lot of responsibilities, is it make sense to split it into separate classes with each own usage? This approach allows for simplifying code complexity and makes it easier for covering tests.

@nya-elimu
Copy link
Member Author

Hi @nya-elimuai as this class contains a lot of responsibilities, is it make sense to split it into separate classes with each own usage? This approach allows for simplifying code complexity and makes it easier for covering tests.

@vrudas Yes, absolutely, I think that's a great idea! Would you be interested in doing this refactoring?

@vrudas
Copy link
Contributor

vrudas commented Jul 2, 2022

@nya-elimuai, have some questions before start:

  • is it suitable to perform such refactoring in this issue?
  • some methods(getWordsFromCsvBackup, getStoryBooksFromCsvBackup) has an extraction logic but result is ignored (by commenting code responsible for value setting into object), such comments should remain? Or can be deleted to make code more readable and easier to support/cover by tests?

@nya-elimu
Copy link
Member Author

nya-elimu commented Jul 3, 2022

@nya-elimuai, have some questions before start:

  • is it suitable to perform such refactoring in this issue?

@vrudas I would recommend this order:

  1. Add unit tests
  2. Refactor the code covered by the unit tests

This way you can be sure that your refactoring does not break anything.

@nya-elimu
Copy link
Member Author

  • some methods(getWordsFromCsvBackup, getStoryBooksFromCsvBackup) has an extraction logic but result is ignored (by commenting code responsible for value setting into object), such comments should remain? Or can be deleted to make code more readable and easier to support/cover by tests?

@vrudas Yes, if you find code that has been commented out, feel free to delete it 🙂

@nya-elimu
Copy link
Member Author

nya-elimu commented Jul 4, 2022

@vrudas You are also welcome to join us in Discord 🙂

@vrudas vrudas self-assigned this Jul 4, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 5, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 5, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 5, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 5, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 6, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 6, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 6, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 12, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 12, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 12, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 12, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 12, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 12, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
vrudas added a commit to vrudas/webapp that referenced this issue Jul 18, 2022
@vrudas vrudas linked a pull request Jul 18, 2022 that will close this issue
nya-elimu added a commit that referenced this issue Jul 20, 2022
…ontentExtractionHelper

#1396 add unit test for the csv content extraction helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants