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();
}
}
Build/Test Issues
Can't go to selected Test from NCrunch Tests Tool Window in VS 2015 CTP5
Started by Der-Albert.com on 18,694 views
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
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 NCrunch Developer
#8583
13 Apr 2016 05:02 UTC
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.
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 NCrunch Developer
#8640
22 Apr 2016 03:21 UTC
A fix for this issue is now available in v2.21, released today - http://www.ncrunch.net/download
Post a reply
Log in to reply.