chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!

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, 2017 by aptido (3,130 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, 2017 by Daniel (1,340 points)
selected May 28, 2017 by aptido
Thanks to clear it up.

When running the test using Reshaper Test Session it works.

That good enough for me :)

 

Cheers,

André
...