Welcome to Typemock Q&A, where you can ask questions and receive answers from other members of the community.

MSTest V2 and DataTestMethod

0 votes

Hi, 

With a test I am using the DataTestMethod and DataRow attributes to have one test method using different parameter values. 

[DataTestMethod]
[DataRow(1)]
[DataRow(2)]
[DataRow(3)]
public void MyTestMethod(int myParameter)
{
...
}

 

When starting the test using TypeMock I get this response:

TestRunner Error: Unexpected Error, when trying to run test: nameoftestmethod [Pending]

Does TypeMock support these attributes? If so am I missing something?

If not is there a estemate when this will be supported?

 

Thanks in advance,

 

André

 

 

asked May 26 by aptido (150 points)

1 Answer

0 votes
 
Best answer
Hi André,

 

Typemock Isolator  does not support using Test Methods with parameters and those attributes yet,

for now we can suggest you use local variables inside of your tests.

 

Cheers,

Daniel.
answered May 28 by Daniel (1,340 points)
selected May 29 by aptido
Thanks to clear it up.

When running the test using Reshaper Test Session it works.

That good enough for me :)

 

Cheers,

André
...