You test success and expected failure.
Your code lives in the business layer/object. In one prg you call all of that functionality one at a time to make sure it works, as expected. If a function receives a date as a parameter, pass in a bad date to validate it doesn't work.
Over the life of your app as changes are made this is an easy way to see if a change made effects anything else.
On Wed, Jul 22, 2020 at 1:35 AM Christof Wollenhaupt < christof@wollenhaupt.org> wrote:
To make an unit test in VFP is as easy as anything: just write your code, highlight it, activate the shortcut (right mouse click), select the option 'Execute the selection'. A very neat and quick solution.
It's even quicker if you use FoxUnit and foxmock. Both are free on VFPX. I've hundreds of unit tests that I can run with a single key stroke that test many different modules of our applications. Writing testable code also tends to lead to a cleaner class design that is more reusable.
-- Christof
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]