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

Notification

Icon
Error

Build failure: System.ArgumentNullException
Rasmus
#1 Posted : Monday, May 14, 2018 7:33:00 AM(UTC)
Rank: Member

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 11
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
Hi,

I am working on a large'ish solution for a bank (=> I cannot share too much code). A recent update of a test project caused NCrunch to fail for that project with

System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at nCrunch.Module.MSTest.Integration.MSTestStaticDiscoverer.resolveDataRowParameters(ReflectedAttribute dataRowAttribute)
at nCrunch.Module.MSTest.Integration.MSTestDynamicDiscoverer.<>c__DisplayClass7_0.<FindFrameworkTestsInAssembly>b__1()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackActivity(String name, Action activity)
at nCrunch.Module.MSTest.Integration.MSTestDynamicDiscoverer.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.DiscoverTests(TestFrameworkDescription[] applicableTestFrameworks, ComponentUniqueName testComponentUniqueName)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentBuildParameters , FilePath , BuildOutput , DirectoryPath[] , FilePath[] )
at nCrunch.Compiler.RemoteBuildRunner..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentBuildParameters )


The problematic code seems to be

[DataRow(TriState.NotSet, null)]
[DataRow(TriState.False, false)]
[DataRow(null, null)]
[DataRow(TriState.True, true)]
[DataTestMethod]
public void When_hin_account_set_with_given_state_map_to_valid_value(TriState? hinAccountState, bool? expectedResult)
{
....
}

where TriState is an external datacontract defined as

[System.Runtime.Serialization.DataContract(Name = "TriState")]
[Serializable]
public enum TriState
{
[EnumMember] NotSet,
[EnumMember] True,
[EnumMember] False,
}

Is there something I can do to make NCrunch happy about this?

Cheers,
Rasmus
Remco
#2 Posted : Monday, May 14, 2018 7:53:08 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 687 times
Was thanked: 827 time(s) in 787 post(s)
Hi Rasmus,

Thanks for posting!

Can you confirm whether you're running the latest version of NCrunch? We fixed a problem with exactly this description in v3.15.
Rasmus
#3 Posted : Monday, May 14, 2018 9:05:52 AM(UTC)
Rank: Member

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 11
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
Ooops no, I am on 3.14. Must have missed an upgrade notification. Will upgrade, sorry for the noise.
1 user thanked Rasmus for this useful post.
Remco on 5/14/2018(UTC)
Users browsing this topic
Guest (3)
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.029 seconds.