Just posting this for others here, there is "quick" workaround for this for people who have updated to beta 5 and still want to use nCrunch:
Basically you can use conditional compilation when under NCrunch to manipulate the Testclass so that it looks like ITestOutputHelper is a ClassFixture.
Then you also need to provide your own outputhelper implementation (this can just write to Console or Debug or something). If this is under the same namespace as the Testclass
it will take precedence and the compiler will bind against it instead of the xUnit interface.
I made a little abstract baseclass so I don't have to do this for all testsclasses.
Code:
namespace NCrunchTest
{
using Xunit.Abstractions;
#if NCRUNCH
using System;
public class ITestOutputHelper
{
public void WriteLine(string m) { Console.WriteLine(m); }
public void WriteLine(string format, params object[] args){ Console.WriteLine(format, args); }
}
#endif
public abstract class XUnitTests
#if NCRUNCH
: Xunit.IClassFixture<ITestOutputHelper>
#endif
{
protected readonly ITestOutputHelper Output;
protected XUnitTests(ITestOutputHelper output)
{
Output = output;
}
}
}