I've noticed that DataTestMethods with actual integers in the DataRows fail if the test is specified to type Double.
Running the same test in Visual Studio native testrunner they pass just fine. But in NCrunch, I have to amend the tests and add a '.0' to make them doubles.
E.g.
[DataTestMethod]
[DataRow(1)]
public void TestMe(double input)
Is not the objective of NCrunch to be as lenient as other test runners when executing tests? It diminishes the value of NCrunch when I have to either amend these or filter them out to find out if any tests are really broken.
Remco NCrunch Developer
#10931
07 Aug 2017 11:35 UTC
Kaerwek wrote:
Is not the objective of NCrunch to be as lenient as other test runners when executing tests? It diminishes the value of NCrunch when I have to either amend these or filter them out to find out if any tests are really broken.
Yes, it is. Unfortunately, there is no defined specification that details things like this in test frameworks. NCrunch's support for MSTest is emulated rather than integrated, which means that there is the potential for edge cases like this to be missed when providing support. These features are still very new in MSTest, so they haven't gone through the same rigorous real-world testing as other features.
I've noted this down to be investigated. For the time being, I recommend making sure you declare parameters as being of the same type as those specified on the method signature.
Post a reply
Log in to reply.