Often when creating first SQLMock tests, the tests tend to fail because of wrong setup reasons.
We forget to mock a specific table reference or we gave some wrong input values.
Currently, it is hard to debug for new users and we should improve this
What changed
This commit adds improved error handling that also make debugging easier:
We validate provided input mocks for completeness (i.e. are all table references mocked)
We validate provided input mocks to be correct (i.e. actually present in the query and not duplicated)
We print the last query if a test failed. This can also help debugging what went wrong
Problem
Often when creating first SQLMock tests, the tests tend to fail because of wrong setup reasons. We forget to mock a specific table reference or we gave some wrong input values. Currently, it is hard to debug for new users and we should improve this
What changed
This commit adds improved error handling that also make debugging easier: