I can't find any docs on using/implementing IXunitTestCollectionFactory
.
I have some custom logic on how I want to resolve the existence of some test cases, from rummaging in the xunit source/samples, this seems to be the way to go.
public class Foo : IXunitTestCollectionFactory
{
public Foo(ITestAssembly assembly, IMessageSink messageSink)
{
throw new NotImplementedException();
}
public ITestCollection Get(ITypeInfo testClass)
{
throw new NotImplementedException();
}
public string DisplayName
{
get { throw new NotImplementedException(); }
}
}
This doesn't ever seem to get run, or at least the exceptions are swallowed and any real code I put in there doesn't seem to be run either.
I've tried adding this to the test assembly, but to no avail
[assembly: CollectionBehavior("MyAssembly.Foo", "MyAssembly")]
Where do I start? Are there any docs on this anywhere?
This:
[assembly: CollectionBehavior("MyAssembly.Foo", "MyAssembly")]
Should be this:
[assembly: CollectionBehavior("MyNamespace.Foo", "MyAssembly")]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With