MayJuun / fhir

A Dart/Flutter package for working with FHIR resources.
MIT License
41 stars 29 forks source link

Add the option to initialize the ResourceDao for testing. #17

Closed lucaspal closed 3 years ago

lucaspal commented 3 years ago

Scope of the PR Add an additional optional value to state that the ResourceDao is being used for testing. This is using sqflite_common_ffi under the hood to mock the underlying sqflite database.

Goal Make it easier to write integration tests for functionalities that use the fhir_db.

What is the additional noise I pulled main into dev to make sure that we are not missing any functionality that has been merged directly into main without being merged to dev first. This is the reason you see changes in files that are not in the scope of this PR.

Edit:

If this is fine I can add myself the same changes in the other places (dstu2,r4, ...)

Dokotela commented 3 years ago

Ended up adding this manually, but should now be included. Let me know if there are issues!