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

Notification

Icon
Error

'Consider inconclusive tests as passing' does not work for [Theory] tests.
otac0n
#1 Posted : Tuesday, December 9, 2014 9:44:16 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
This fails, regardless of wheter or not the 'Consider inconclusive tests as passing' setting is enabled.

Code:
using System;
using NUnit.Framework;

namespace ReproNCrunchIssue
{
    [TestFixture]
    public class TypeTests
    {
        [Datapoints]
        private Type[] types = { typeof(int), typeof(string) };

        [Theory]
        public void TypeTest(Type type)
        {
            Assume.That(type, Is.Not.EqualTo(typeof(string)));
        }
    }
}
otac0n
#2 Posted : Tuesday, December 9, 2014 9:47:16 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/22/2011(UTC)
Posts: 51
Location: Seattle, WA

Was thanked: 7 time(s) in 7 post(s)
This works fine:

Code:
using System;
using NUnit.Framework;

namespace ReproNCrunchIssue
{
    [TestFixture]
    public class TypeTests
    {
        private Type[] types = { typeof(int), typeof(string) };

        [TestCaseSource("types")]
        public void TypeTest(Type type)
        {
            Assume.That(type, Is.Not.EqualTo(typeof(string)));
        }
    }
}
Remco
#3 Posted : Tuesday, December 9, 2014 10:12:23 PM(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 can see the same behaviour on my side. This doesn't look right.

I'll take a deeper look and will see what I can do.


Cheers,

Remco
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.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download