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

Refactor/Redo/Create new Unit Tests #159

Open
7 of 19 tasks
pavliuc75 opened this issue Oct 15, 2024 · 1 comment
Open
7 of 19 tasks

Refactor/Redo/Create new Unit Tests #159

pavliuc75 opened this issue Oct 15, 2024 · 1 comment
Assignees

Comments

@pavliuc75
Copy link
Contributor

pavliuc75 commented Oct 15, 2024

With the spring boot update comes the update to Junit 5, and there are some things to consider when writing unit tests. There is nice guide with good standards (IMO): https://phauer.com/2018/best-practices-unit-testing-kotlin/

There are many files that just don't have a serve a purpose, incomplete, or outdated, take a look at those as well. (ie. StudyDeploymentControllerTest)

There is also a guide on spring boot testing with kotlin where they show you examples of unit-, integration- and e2e tests: https://www.baeldung.com/kotlin/spring-boot-testing

Checklist

  • Wait for dependency updates to complete
  • Switch to Mockk and omit Mockito
  • Use backticks in test and test fixture names to improve readability
  • Consider using Kotest (kotlin's primary testing framework) instead of junit (no, we'll stick to what core is using to make things more consistent)

Modules

  • account
  • collection
  • common
  • consent
  • data
  • datapoint
  • datastream
  • deployment
  • document
  • file
  • protocol
  • security
  • study
  • export
  • WS input types
@pavliuc75 pavliuc75 self-assigned this Oct 15, 2024
@pavliuc75
Copy link
Contributor Author

mby also add authorization tests to contrllers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant