I have not written anything for a week. Bad me. So, the nice thing about testing is that I was able to fire up my tests and run them and I see right where I was working when I left off last time.
Continuing from last time, I am going to add the same form getting functions (which allow me to substitute a test form getting object where I can just set the values in the test. I already did that with the main class I was testing, but the test still couldn’t pass due to another dependency in the LineControlManager class. I will add the new functions to this class as well so I can complete the test and get it to pass.
I just got it passing. Here is the code:
The Test
The ECI_POLineController applicable code
Additional code changes in ECI_PoLineControlManager
FormValueGetterI
FormValueGetter_orderlineitemsForm
FormValueGetter_Test
So that got us to a new passing test and now we can create more tests for this particular case and we have a new interface we can use to put other classes under test by changing the live code to use FormValueGetterI objects instead of directly accessing the form. Yay!