开发者

what test data approach/framework is recommended for .net unit testing

开发者 https://www.devze.com 2023-01-01 18:27 出处:网络
what test data approach/framework is recommended for .net unit testing?I\'m in VS2010, C#开发者_如何学C, doing business logic layer testing.

what test data approach/framework is recommended for .net unit testing? I'm in VS2010, C#开发者_如何学C, doing business logic layer testing.

By approaches I mean like: creating database snapshots, programmatically creating each time, etc etc. Like what approach to use to ensure at the start of each test the database is in a known state.


Some would say that if you're using the database, then you're doing functional testing, not unit testing.


This is not directly related to database testing. But in general when we need to setup test data we can use a library called NBuilder. It can create single instance of a calss as well as a list of instances. It uses a very fluent interface and is very easy to use. I had written a blog about the same.

0

精彩评论

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