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

Notification

Icon
Error

2 Pages<12
Can't go to selected Test from NCrunch Tests Tool Window in VS 2015 CTP5
GlobalConcepts
#21 Posted : Tuesday, April 12, 2016 1:54:18 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/7/2013(UTC)
Posts: 52
Location: Germany

Thanks: 5 times
Was thanked: 6 time(s) in 6 post(s)
Sample Test:

public class SetSearchStringExecutionMainTests
{
[Theory, NSubstituteCrmAutoData]
public void Constructor_HasNullGuards(GuardClauseAssertion assertion)
{
assertion.Verify(typeof (SetSearchStringExecutionMain).GetConstructors());
}

[Theory, NSubstituteCrmAutoData]
public void Constructor_Returnsobject(SetSearchStringExecutionMain sut)
{
Assert.IsAssignableFrom<IExecutionMain>(sut);
}

[Theory, NSubstituteCrmAutoData]
public void Methods_HaveNullGuards(GuardClauseAssertion assertion)
{
assertion.Verify(typeof (SetSearchStringExecutionMain).GetMethods());
}

[Theory, NSubstituteCrmAutoData]
public void Run_ExecutesUpdateEntityOnce(
[Frozen] IMessageDependentExecution messageDependentExecution,
SetSearchStringExecutionMain sut)
{
// Arrange


// Act
sut.Run();

// Assert
Assert.Equal(1, messageDependentExecution.ReceivedCalls().Count());
}
}

Sample Code:
public interface IExecutionMain
{

void Run();
}

public interface IMessageDependentExecution
{
void Run();
}

public class SetSearchStringExecutionMain : IExecutionMain
{
private readonly IMessageDependentExecution _messageDependentExecution;

public SetSearchStringExecutionMain(IMessageDependentExecution messageDependentExecution)
{
if (messageDependentExecution == null)
{
throw new ArgumentNullException(nameof(messageDependentExecution));
}
_messageDependentExecution = messageDependentExecution;
}

public void Run()
{
_messageDependentExecution.Run();
}
}
GlobalConcepts
#22 Posted : Tuesday, April 12, 2016 2:02:04 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 2/7/2013(UTC)
Posts: 52
Location: Germany

Thanks: 5 times
Was thanked: 6 time(s) in 6 post(s)
Navigation to the first test is working, since I've updated to NSubstitute 1.10. But the rest still fails.
xunit / xunit.extensions is 1.9.2 - we cannot go higher because of some dependencies of AutoFixture.Xunit that is not compatible to xunit 2.x
Remco
#23 Posted : Wednesday, April 13, 2016 5:02:11 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for your help here. I've now managed to reproduce this issue.

I can confirm this is a regression in 2.20. It impacts ALL Xunit v1 theories, regardless of custom attributes, autofixture, etc.

Xunit v2 is not affected by this problem.

A fix will be out for this in the next release of NCrunch, due out within the next few days.

Sorry for the trouble.
Remco
#24 Posted : Friday, April 22, 2016 3:21:17 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
A fix for this issue is now available in v2.21, released today - http://www.ncrunch.net/download
Users browsing this topic
Guest (2)
2 Pages<12
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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download