KevinDelao / Cloud-Backend-Project

0 stars 0 forks source link

Write unit tests for Spring Boot service #39

Closed jsunthon closed 4 years ago

jsunthon commented 4 years ago

Our service currently does not have any unit tests. To run the unit tests, you can use the mvn test compile command.

Write unit tests for the Controller and Service classes. JUnit is already included in the project. Make sure to mock out dependencies (mockito is already included as well).

For Controller testing, read this guide: https://reflectoring.io/spring-boot-web-controller-test/

For Service testing, read this guide: https://reflectoring.io/unit-testing-spring-boot/

jsunthon commented 4 years ago

I'll have some code sample to attach to here by end of day tomorrow

KevinDelao commented 4 years ago

Starting tests today