Unit testing a class that uses a Timer
I've got a class that has a private member that has for type System.Windows.Forms.Timer . There's also a private method that is being called every time my timer ticks. Is it worth testing the method? (since it's private) How can I test it? (I know I can have my test class inheriting the class I want to test...) Should I be mocking my timer? Because if I have to test a class that uses an internal timer, my tests may take a lot of time to complete, right? edit: Actually, the method has a dependency on timing, here's the code: private void alertTick(object sender, EventArgs e) { if