This might seem like a stupid question but I find myself facing this problem fairly often.
I want to write an simple application that monitors when a type on the keyboard and when I use the mouse so that I can monitor my computer usage and productivity.
Consider the following gherkin feature:
Feature: MouseInteractionMonitoring
In order to know when the user is at the computer
As an interaction monitor
I want to be able to be able to monitor when the user moves the mouse
To my mind this does not seem testable.
So what should I do?
Should I resolve this using a layer of abstraction by writing a separate component that monitors mouse movement and then have that report to a user interaction module and mock the mouse movement component?
How does one deal with untestable code like the above?
I would really appreciate any advice you could offer on this.