Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COPart of the gain in unit testing is breaking the system up into small enough units that they have easily expressible behaviours. If you have lots of complicated private code you feel should be tested as multiple units, perhaps refactoring it into a concert of smaller classes rather than one big one is the answer.
      singulars
    2. COPete: No, it is not an answer, since I explicitly wrote that I am not interested in that approach. I feel your and Attila's answers being an off-topic. You are both right if being in the ideal world and I know that too. This is not new to me. Did you ever work with a really complex legacy code which needs to be sanitized/refactored at all? And this is going to be a really long lasting part. Here you can't just break up everything in smaller pieces. This is non-ideal world where you sometimes really need a portable way to access privates for testing purposes.
      singulars
    3. CO@ovanes - I think I understand better now where you are coming from with the question. To address the immediate need to be able to test legacy code, the template function declaration will be the easiest & most portable way. This said, you should still strive to eventually remove this approach and replace it with pure unit testing (i.e. testing only public/protected parts). The reason being that if you couple the test to private parts, you will have to double your efforts every time you make a change to the tested code: the test needs to change as well -- even for a small reorganization
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload