Reputation: 3005
I'm using xunit v2.1.0, xunit.extensions v1.8.0.1549, AutoFixture v3.40.0, AutoFixture.Xunit v3.40.0 and I have this simple trivial test that uses AutoData
using Ploeh.AutoFixture.Xunit;
using Xunit;
namespace Tests
{
public class ToolTests
{
[Theory, AutoData]
public void Test(int foo)
{
Assert.NotEqual(0, foo);
}
}
}
And the error that I get in Resharper (v9.2) test runner is
System.InvalidOperationException No data found for Tests.ToolTests.Test Exception doesn't have a stacktrace
I've noticed that xunit.extensions is not the last version (currently v2.0.0), but when I try to update given nuget package I get error:
Unable to resolve dependencies. 'xunit.extensions 2.0.0' is not compatible with 'AutoFixture.Xunit 3.40.0 constraint: xunit.extensions (≥ 1.8.0.1549 && < 2.0.0)'
Any clues why this is happening?
Upvotes: 7
Views: 1663
Reputation: 3513
You have to use the AutoFixture.Xunit2
package, instead of the AutoFixture.Xunit
when you're using xUnit 2.0 or above.
Upvotes: 13