Visual Studio 2008の単体テストフレームワークに同等のNUnitのTestCaseAttributeはありますか?
あなたが知っている、このようなもの:
[TestCase(1, 1, 1)]
[TestCase(2, 2, 2)]
[TestCase(3, 3, 3)]
public void Test1(int a, int b, int c)
{
// do stuff depending on the TestCase
}
Visual Studio 2008の単体テストフレームワークに同等のNUnitのTestCaseAttributeはありますか?
あなたが知っている、このようなもの:
[TestCase(1, 1, 1)]
[TestCase(2, 2, 2)]
[TestCase(3, 3, 3)]
public void Test1(int a, int b, int c)
{
// do stuff depending on the TestCase
}
残念ながら、MSTestはこの方法でパラメータ化されたテストをサポートしていません。最も近いのはDataSource属性です。これにより、テストメソッドの外部データソースを指定できます。