Skip to content
Discussion options

You must be logged in to vote

Hey @richardoSGSI - I've just pushed v0.1.1063 which can support injecting up to 5 generic arguments via ClassDataSource.

So you could do:

namespace MyTests.Tests
{
  [ClassDataSource<MyFixture1, MyFixture2, MyFixture3>(Shared = SharedType.Globally)]
  public class Tests
  {
    public Tests (MyFixture1 myFixture1, MyFixture2 myFixture2, MyFixture3 myFixture3)
    {
	...
    }
  }
}

Regarding using the DataSourceGeneratorAttribute - You'd have to implement it yourself. ClassDataSource is actually built on top of DataSourceGeneratorAttribute - And simply uses the Shared argument to store already created instances in dictionaries etc.

So it's possible, but you'd have to implement it yours…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by richardoSGSI
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants