Code I'm working on collects performance data (eg CPU usage) from the operating system. I'm wondering if I should bother to attempt to unit test this code. It seems that to unit test code, you need to design code that is isolated into units. My code is so closely tied to the OS though that if I isolated the code out that interacts with the OS into a wrapper that I could mock out, there wouldn't be much left to test.
So, I'm thinking unit testing won't work here. Am I misunderstanding how I should use unit tests? Everybody in blogs I read preaches that they're good, but I'm not sure they're useful for all application domains.
Eg, if I move this code to a different version of the OS, I'm sure there will be lots of bugs, but I can't see how unit tests could help me find them.
Have you found the same problem? Should I even attempt to write unit tests for this?