阅读背景:

如何在单元测试中伪造SqlDataAdapter,SqlConnection和SqlCommand

来源:互联网 

I'm trying to figure out how I can run unit tests on a class I created to execute queries on a database but I keep running around in circles trying to figure out how to fake all the dependencies. My class implements IDisposable which closes the SqlConnection if open. A typical method (I have several overloaded) for selecting data looks like this:I'm trying to figure out how I can run unit tes




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

分享到: