📜  xunit 可以 collectionfixture 有参数 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:31.236000             🧑  作者: Mango

代码示例1
public abstract class BaseCollectionFixture : ICollectionFixture
    where TFixture : class
{

    protected BaseCollectionFixture(Assembly assemblyUnderTest)
    {
        // Do my fixture stuff with the assembly
    }
}


[CollectionDefinition("Special tests")
public class ConcreteFixture : BaseCollectionFixture
{
    public ConcreteFixture() : base(typeof(MyClassUnderTest).Assembly) {}
}