Why are the interfaces in Windows.Devices internal?

93 views Asked by At

I'm writing an internal nuget package for my company that will allow applications in our suite to speak to specific bluetooth devices for certain workflows. Pretty cool stuff!

But as I began the project, I tried to take the opportunity to run TDD as I was starting from scratch. It didn't take me very long to realize something strange to me:

The interfaces that the classes in the Windows.Devices namespace are all marked as internal.

I've been pondering this for a couple of days, but I can't get away from asking the following question: Does this mean that anyone using bluetooth for Windows 8/10 not writing ANY tests where these services are mocked? I'm having to wrap/adapt every single one of these classes because their construction is not trivial. Then write an interface for the wrapper/adapter that is basically just a mirror of the interface that I should be able to use in my mind...

Questions:

  • Aren't interfaces meant to be public?
  • What purpose do they serve if they don't share the same accessibility as their implementations?
  • IS anyone writing unit tests for code that utilizes these libraries?
  • Am I missing something, and there is a way to mock the interfaces of these classes despite them being internal?
0

There are 0 answers