riesgos / async

0 stars 0 forks source link

Add more unittests #97

Closed nbrinckm closed 1 year ago

nbrinckm commented 1 year ago

Add the unittests for all the repos and make needed changes to make it run with H2 database (and still with Postgres too)

nbrinckm commented 1 year ago

I think I stop now with writing more tests. I think I covered all of the logic of the database interaction, and most of what I can test without running or mocking more advanced external services.

The most tricky change in this MR is the difference in the handling to get the ids when inserting the data. For postgres we used a way that the H2 database doesn't support - and the easy way to do it with H2 isn't supported in postgres. I tested the way I do it now with a test project & a real postgres, so I'm almost sure that it should™ work. (However, in case it doesn't - then the way as Ids are extracted from the insert commands is probably the first point to take a look).

nbrinckm commented 1 year ago

@MichaelLangbein I'm going to merge now.