Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Type mismatch on test parameter 2 (parameter should not be null)
qujck
#1 Posted : Wednesday, November 14, 2018 11:53:19 AM(UTC)
Rank: Member

Groups: Registered
Joined: 4/19/2014(UTC)
Posts: 16
Location: United Kingdom

Thanks: 9 times
Was thanked: 1 time(s) in 1 post(s)
The following code works fine from Visual Studio Test Explorer but NCrunch displays an error:

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


Code:

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



I have set Framework utilisation type for MSTest to UseDynamicAnalysis
Remco
#2 Posted : Thursday, November 15, 2018 12:31:41 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,476

Thanks: 717 times
Was thanked: 898 time(s) in 854 post(s)
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.
1 user thanked Remco for this useful post.
qujck on 11/15/2018(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.022 seconds.