I love writing unit tests (I'm not sure why it's just something I find
quite enjoyable). I don't think I have quite 100% code coverage for
the engine of my current toy project, but it is likely very close (I
try not to write any code unless I have a test to prove I need it).
Unfortunately that is NOT the case with the GUI part of my code. I
made some initial attempts, wasn't happy with the results, and had too
many ideas running around in my head that I needed to get into code so
the GUI code (until this morning) was completely untested.
This morning I buckled down and started messing around a bit with unit
tests for the GUI. So far it's been a mixed bag.
My tiny little App() class sets the wx.ToolTip.Delay(), but as far as
I know there is no way to prove that I actually set the ToolTip delay
in a unit test. My biggest hurdle is sending events to objects.
I have a Notebook object and so far my attempts at creating a
CommandEvent or a NotebookEvent and then passing it to the
ProcessEvent() method of the object have failed. I usually end up with
an error stating "expected argument of type wxEventType.
I'm at a loss. Can anyone point me in the right direction?
···
--
Stand Fast,
tjg. [Timothy Grant]