Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Having dealt with most of the messy UI code, I'm ready for some clean, efficient, highly rational business logic. This is work I usually do in unit tests. And the first thing I need is a unit test app, one that will run with my ClarionTest unit testing framework. 

I begin by creating a new unit test app from a TXA that comes with ClarionTest. 

By convention I usually create a unit test app for each class, and I give the app the same name as the class with a "Tests" suffix. I know my class prefix will be CML_ (for ClarionMagLibrary). But I haven't got a class name yet.

Which leaves me stumped again:

 

 

It's hard because the whole time I'm thinking about class design I'm trying to keep the class as generic as possible. A class that handles just one situation is a last resort.