trebol-ecommerce / trebol-backend-monolith

Monolithic eCommerce backend web application that exposes a RESTful API.
MIT License
16 stars 21 forks source link

Write unit tests #22

Closed bglamadrid closed 2 years ago

bglamadrid commented 3 years ago

This project has almost no tests at all. To start somewhere, some unit tests should be written. Given that this backend is powered by Spring Boot's dependency injection features and the such, tests should conform to adequate practices in order to execute as expected.

Tests are required at least for the following components:

Before writing tests on a class, a specific issue should be created for them, so acknowledge it is being worked on.

bglamadrid commented 3 years ago

This library will come in real handy https://github.com/rest-assured/rest-assured

kartik-tiwari commented 3 years ago

I'd like to work on this issue.

bglamadrid commented 3 years ago

I'd like to work on this issue.

Thanks! Remember, you can ask me anything about the project. Do your best and we can work it out from there 😉

kartik-tiwari commented 2 years ago

import org.trebol.jpa.entities.QPerson; import org.trebol.jpa.entities.QUser; these are not defined

bglamadrid commented 2 years ago

import org.trebol.jpa.entities.QPerson; import org.trebol.jpa.entities.QUser; these are not defined

You have to try compiling the project first, so that a maven plugin can generate those classes for you.

bglamadrid commented 2 years ago

I got to develop some unit tests for the first time and I've gotten around 25% of the codebase. This link provides better insight on this.

The packages with utmost importance to be covered are:

bglamadrid commented 2 years ago

All that's left is #88...