I'm currently trying to create some classes to perform some Fourier transforms. I am trying to do this by first creating some unit tests and then creating basic functions.
The problem with this is that well, I can write one test to see if the algorithm works, and I know the expected result. Then I begin to build a large algorithm, and if it works, my unit tests will pass.
My problem here is not TDD. Because usually you create tests that test the very basic function of a class. Now my class basically runs one big algorithm, and I cannot test the smaller parts of the algorithm, since they are not publicly available (I was always told that you would never want to test private methods).
How do you deal with this?
source
share