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



Theory with datetime randomly is not being executed (see example)
#1 Posted : Monday, July 9, 2018 10:45:00 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/9/2018(UTC)
Posts: 2
Location: Poland

Was thanked: 3 time(s) in 1 post(s)
Hi, the following code sometimes is not being executed, whereas other 500 test are perfectly fine. There aren't any issues with ReSharper runner or with console. Newest versions of NCrunch, Visual Studio 2017 and Xunit are used


public class DateExtensionsTests
        public static IEnumerable<object[]> Dates => new[]
            new object[] { DateTime.MinValue, false },
            new object[] { default(DateTime), false },
            new object[] { DateTime.MaxValue, false },
            new object[] { DateTime.Now.Subtract(TimeSpan.FromDays(1)),true  }, // fails
            new object[] { DateTime.Now.Subtract(TimeSpan.FromHours(1)), false  }, // fails
            new object[] { DateTime.Now.AddDays(1), false  } // fails

        [Theory, MemberData(nameof(Dates))]
        public void ShouldReturnDeadlineCorrectness(DateTime userSetDate, bool isFromPast)

Error message:
This test was not executed during a planned execution run. Ensure your test project is stable and does not contain issues in initialisation/teardown fixtures.
#2 Posted : Monday, July 9, 2018 12:34:54 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 705 times
Was thanked: 878 time(s) in 835 post(s)
Hi, thanks for posting!

This use case is not supported under NCrunch. See here for more details.
Users browsing this topic
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.