cph-cachet / carp-webservices-spring

REST-based implementation of the CARP Core Domain Model using Spring Boot in Kotlin
https://carp.dk
MIT License
3 stars 2 forks source link

Refactor/Redo/Create new Unit Tests #159

Open pavliuc75 opened 1 month ago

pavliuc75 commented 1 month ago

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

Modules

pavliuc75 commented 1 month ago

mby also add authorization tests to contrllers