is there a way to write unit tests for exposed dao...
# exposed
h
is there a way to write unit tests for exposed daos like room daos https://developer.android.com/training/data-storage/room/testing-db?
l
We use a H2 in-memory database for our unit tests: H2 Database Engine
👍 1
o
@Horatio Thomas At the first glance it looks quite similar to what we do in Exposed's test modules (
exposed-test
and
exposed-r2dbc-test
), did you have a chance to look at that? Usually we open connection to the database, create a single transaction and execute some logic to validate Exposed's behavior. Just a simple insert test for instance. Do you have any special requirements to the tests? Should be test run only in memory (our tests are running over conteinerized databases), or anything else?
h
Thanks Oleg, I'll take a look just wanted to run tests against an in memory database
@Oleg Babichev I began to look into that unfortunately it looks like those modules aren't published to maven though