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

Notification

Icon
Error

MSTest v4 - DataRow - Collection Expressions
UppSol
#1 Posted : Thursday, May 21, 2026 6:22:32 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 3/21/2019(UTC)
Posts: 42
Location: Austria

Thanks: 31 times
Was thanked: 7 time(s) in 7 post(s)
Hi, I reported an issue via VS 2026.

It seems that NCrunch does not support DataRow Tests with Collection Expressions, however the VS 2026 test runner and the R# test runner support it, so I think NCrunch should support this as well.

We are using MsTest v4 and C# (.Net 10), the latest version of NCrunch is installed, we get this error: "Test paramter count missmatch" and in the output window I see this error:
"PID:59052 08:26:21.4716 ?-31] The type or namespace name 'I<>' could not be found (are you missing a using directive or an assembly reference?)
[PID:39204 08:26:21.5496 LocalBuildTask-50] ERROR (Build): Upper.ProductLabellingOrderManager.ArticleConnector.Test: C:\Temp\NCrunch\39204\35\Upper.ProductLabellingOrderManager.ArticleConnector.Test\ProfitcenterConverterBehaviour.cs (32): The type or namespace name 'I<>' could not be found (are you missing a using directive or an assembly reference?)"

Here is a very simple sample:

[TestMethod]
[DataRow(["A", "B", "C"])]
[DataRow(["X", "Y", "Z", "K"])]
[DataRow(["U", "V", "W"])]
[DataRow(["S", "X", "K", "W", "V"])]
public void Convert_Should_Only_Return_ProfitcenterIds_That_Are_Available(IReadOnlyCollection<string> profitcenterIds)
{
//arrange
IReadOnlyCollection<Profitcenter> expectedProfitcenters = GetExpectedProfitcenters(profitcenterIds);

//act
IReadOnlyCollection<Profitcenter> result = _converter.Convert(profitcenterIds, _availableProfitcenters);

//assert
result.Should().BeEquivalentTo(expectedProfitcenters);
}

Please let me know if you need more info.

Br
Remco
#2 Posted : Thursday, May 21, 2026 6:30:33 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,546

Thanks: 1029 times
Was thanked: 1380 time(s) in 1281 post(s)
Hi, thanks for sharing this. I also saw it come in through the bug reporter :)

NCrunch needs some special handling to be able to work with these collection expressions. The latest version doesn't implement them yet. I've noted them down to see if I can plug them into the next release. Thanks again for making me aware of it.
1 user thanked Remco for this useful post.
UppSol on 5/21/2026(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.021 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download