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 for `org.trebol.operation.services.ReceiptServiceImpl` #146

Closed mepox closed 1 year ago

mepox commented 2 years ago

From #88

ReceiptServiceImpl should have unit tests that ensure it complies with the interface and methods it implements, IReceiptService.

No need to provide coverage for private methods, only the @Override public ones from the aforementioned interface.

This interface provides a single method that must fetch receipt information for a given order, given its transaction token (which is created at the beginning of the checkout process).

mepox commented 2 years ago

Hi @bglamadrid ! I would like to do this one too.

bglamadrid commented 2 years ago

@mepox here you will need to pull and merge main into your local branch too, due to #157.

NyorJa commented 2 years ago

@mepox here you will need to pull and merge main into your local branch too, due to #157.

Regarding on this I think its a good practice to update fork repos everytime if there is an update and then merge locally if PR is raised 😁

bglamadrid commented 2 years ago

Regarding on this I think its a good practice to update fork repos everytime if there is an update and then merge locally if PR is raised 😁

And if any of you find yourselves in trouble while resolving conflicts, you can -and totally should- ask for help. Now you can open a new thread in Discussions for this 👌

mepox commented 2 years ago

@bglamadrid So I guess, now I can use and add @Builder annotation to Pojos that I need for my tests, right?

Edit: And fix classes where the annotation cause problems, for example in some converters which right now uses the Pojos default constructor..

Edit2: Or add those converter changes to a separate PR?

bglamadrid commented 2 years ago

@mepox You can use Pojos annotated with builders, but you should refrain of annotating pojos yourself unless you're including them as part of new functionality. This issue is not fit for that.

If you have a problem with building or testing the code before you even begin, you probably are missing the latest changes from main. Make sure to fetch & pull often, and always do both before creating new branches.