public static async void CanInjectCollectionFixtureIntoClassFixture() { var testCase = Mocks.XunitTestCase <TestClassWithClassFixtureWithDependency>("Passing"); var collectionFixture = new DependentCollectionFixture(); var runner = TestableXunitTestClassRunner.Create(testCase, collectionFixture); await runner.RunAsync(); Assert.Null(runner.RunTestMethodAsync_AggregatorResult); var classFixture = runner.ClassFixtureMappings.Values.OfType <ClassFixtureWithCollectionFixtureDependency>().Single(); Assert.Same(collectionFixture, classFixture.CollectionFixture); }
public ClassFixtureWithCollectionFixtureDependency(DependentCollectionFixture collectionFixture) { CollectionFixture = collectionFixture; }