If all the business logic is present in a datamodule (TSQLDataSets and TDataSetProviders) how would you refactor the code to make the application more appropiate for unit testing?
相关问题
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Dependencies while implementing Mocking in Junit4
- Is TWebBrowser dependant on IE version?
- How to unit test a reactive component where ngCont
相关文章
- How to replace file-access references for a module
- How to mock methods return object with deleted cop
- What is a good way of cleaning up after a unit tes
-
EF6 DbSet
returns null in Moq - React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- Best way to implement MVVM bindings (View <-> V
- python unit testing methods inside of classes
Some basic tips:
Hope this helps.
After the last question about this, I wrote a blog post about how to do it.
For automated construction of tests for DUnit, you could use OpenCTF, which is able to find all components and create test cases automatically at test run time. The example tests include some basic data access layer tests.
http://sourceforge.net/projects/openctf/
and
http://cc.embarcadero.com/Item/24136
alt text http://www.mikejustin.com/images/OpenCTF.gif