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

Notification

Icon
Error

Inclusive test result when no suitable constructor was found? (parameterized test fixture)
GreenMoose
#1 Posted : Friday, April 6, 2018 7:28:32 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
[v3.15.0.1]
Hi,

Code:

    [TestFixture("dummy")]
    internal class BadFixture 
    {
        public BadFixture(int dummy)
        {
            
        }
        [Test]
        public void YouShallNotPass()
        {
        }
    }
    

Given above test fixture (NUnit), NCrunch reports:
Quote:

NCrunch: This test reported an inconclusive result. You can adjust whether NCrunch should treat this result as a pass by using the 'Consider inconclusive tests as passing' NCrunch project-level configuration setting.
....BadFixture does not have a suitable constructor


Should this really be inconclusive (which you then miss if you have "Consider inconclusive tests as passing" enabled) rather than an error?


Thanks.
Remco
#2 Posted : Friday, April 6, 2018 11:04:50 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,

This area is under the control of NUnit. I guess NUnit's response to this situation is to consider the test as being inconclusive because it's constructor can't be called. I'm not sure if this is intentional on their part. I personally feel that NUnit should report this as an error. Unfortunately it isn't something that we have any control over.
1 user thanked Remco for this useful post.
GreenMoose on 4/6/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.021 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download