开发者

Looking for documentation for writing database-related unit tests in .Net [closed]

开发者 https://www.devze.com 2022-12-23 20:11 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_如何学运维

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I have heard that MbUnit comes with pretty nice test decorators which allow writing db-related tests with ease.

I am struggling to find good documentation with samples.

Also, can the same thing be achieved with the latest Micosoft's Test package?

Many thanks.


You might want to give some more info on what type of test you want to do ...

Microsoft's Test package is only really useful if you have Team Test. Assuming you do you can test two ways

Raw SQL (only useful if you are testing sps) http://msdn.microsoft.com/en-us/library/bb381703(VS.80).aspx

Data Driven Tests: http://msdn.microsoft.com/en-us/library/ms379625(VS.80).aspx

Other option if you dont* have Team Test is to just use the basic UnitTest in the Unit Test Framework. It is provided with general editions of VS. Problem is you are going to have to basically setup tear down everything. It only gives you descriptors to Initialize/Cleanup/Dependencies/Tests nothing fancies but it gives you the "unit test" feel and ability to perform test runs.

0

精彩评论

暂无评论...
验证码 换一张
取 消