one month ago I started writing an application in Java which uses Phidgets to control the lights and speakers in each room of my house. I'm working with spring and I'm used to test everything quite well. And my main problem is that I can't mock a Phidget without heavy usage of a mock framework.
My idea is that the Phidget Team could introduce interfaces for the main Phidget classes and the Manager, such that each developer has the possibility to mock against the interface and implement his own Phidget mock. This would be a non invasive refactoring and the developers could easily dependency inject the Phidget classes.
The classes in the event package doesn't need to be refactored.
What do you think about this?
I attached two sample interfaces which should point out the idea. I'm willing to help the Team implementing the interfaces if they would consider to introduce the interfaces.
I also found some posts about this feature request:
Please vote for this feature request such that we can test the Phidgets framework easily.
Thanks and regards,