MSTest Equivalent for NUnit's Parameterized Tests?

前端 未结 6 1590
栀梦
栀梦 2020-12-01 17:31

NUnit supports a feature where you can specify a set of data inputs for a unit test to be run multiple times.

[RowTest]
[Row(1001,1,2,3)]
[Row(1,1001,2,3)]
[         


        
6条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 18:18

    Would this help?

    This week I was adding some unit tests to a project that is managed by TFS, so I decided to use the "core" unit testing framework available with VS2008, and unfortunately it doesn't support RowTests. But it has a similar feature called Data-Driven Unit Test. With this approach it's a bit more complicate to implement the "simple" RowTest scenario, but it allows also to implement more complicate ones.

提交回复
热议问题