amitv87 / winusbnet

Automatically exported from code.google.com/p/winusbnet
Other
0 stars 0 forks source link

Add interfaces and hide the implementation #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Could you please make all the currently publicly visible classes just 
interfaces, so that they can be mocked easily?

This would involve:
 - Make the currently visible classes internal and rename them
 - Make new public interfaces with the same names as the current public classes
 - Make the now internal classes implement the interfaces.

That way you can expose only interfaces that are implemented by your internal 
classes. And those interfaces are then easily testable, by mocking framworks 
like, Moq.

Original issue reported on code.google.com by daniel.f...@integral-it.ch on 25 Aug 2012 at 7:03

GoogleCodeExporter commented 9 years ago
I have no plans to implement this. Also it would likely break existing code.

Original comment by madwizar...@gmail.com on 1 Nov 2012 at 9:29