阅读背景:

使用网络依赖代码进行单元测试

来源:互联网 

I'm trying to be better about unit testing my code, but right now I'm writing a lot of code that deals with remote systems. SNMP, WMI, that sort of thing. With most classes I can mock up objects to test them, but how do you deal with unit testing a real system? For example, if my class goes out and gets the Win32_LogicalDisk object for a server, how could I possibly unit test it?I'm trying to be better about unit testing my c




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: