4

I just entered the Delphi's Unit Testing area - never have done it in Delphi. The things went fine until I came to database connection and queries. I am using TFDConnection and TFDQuery in data access classes.

I found an article stating that for "expensive" calls interfaces should be used. I looked into FireDAC's source code and haven't found any suitable interface that I could use. And the perspective to implement most of FireDAC's behaviour doesn't cheer me up.

How to do mocking database objects the right way?

I am starting to think that pointing the system to test database should be much easier.

Paul
  • 25,812
  • 38
  • 124
  • 247
  • I have always read that you shouldn't have unit tests connected to a database, your approach (mocks) could solve those issues, getting repeatable responses. I'm looking for what the experts think of it. – Marc Guillot Sep 29 '16 at 10:24

0 Answers0