Build/Test Issues

Type mismatch on test parameter 2 (parameter should not be null)

Started by qujck on 3,043 views

The following code works fine from Visual Studio Test Explorer but NCrunch displays an error:

Type mismatch on test parameter 2 (parameter should not be null)



    [TestClass]
    public class UnitTest1
    {
        [DataTestMethod]
        [DataRow(new[] { "a", "b", "c" }, null)]
        public void TestMethod1(string[] data, string[] moredata)
        {
        }
    }



I have set [h]Framework utilisation type for MSTest[/h] to [h]UseDynamicAnalysis[/h]
Hi, thanks for sharing this issue.

I've reproduced it exactly as described. This looks like an edge case where NCrunch's emulator just doesn't match the same behaviour. I've noted this down to be fixed in the next release.
Fixed in 3.23.0.10, thank you!

Edited

Post a reply

Log in to reply.