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: 17
Location: United Kingdom

Thanks: 9 times
Was thanked: 2 time(s) in 2 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: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 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)
qujck
#3 Posted : Thursday, January 10, 2019 3:14:44 PM(UTC)
Rank: Member

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

Thanks: 9 times
Was thanked: 2 time(s) in 2 post(s)
Fixed in 3.23.0.10, thank you!
1 user thanked qujck for this useful post.
Remco on 1/10/2019(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.024 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download