Hello!
I've never used TDD and unit testing "properly", but would like to learn some techniques. Could you please help me with the idea on writing test methods for this not-so-testable (in my opinion) case.
The class I want to test is yet to be written (I remember, I need to write the test first), but it will have a method to hook on Windows shortcut key combination (passed as parameter) and will raise an event when that key combination is pressed. So how do I go about testing such a case? Do I need to write key press simulation routine first? Do I need a unit test for key press simulation or will the shortcut hook test "cancel out" the need for it? Is this a unit test or is it called some other way altogether?
The point of this question is rather educational, I perfectly understand that this is not the best case for unit testing and is probably not worth the effort. I just want to use non-trivial scenario for better understanding of the principles.