Dependent data sources #2047
Replies: 1 comment 1 reply
-
This isn't supported currently with ClassDataSource. You're best off creating a factory class that does this for you and injecting that in. Alternatively, if you inject them in via the class constructor, you can use a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to inject three classes into my test as a data source.
[ClassDataSource<SomeClass1, SomeClass2, SomeClass3>(Shared = [SharedType.PerTestSession, SharedType.PerTestSession, SharedType.PerTestSession]
All classes implementing
IAsyncInitializer
.All good. However, SomeClass1 depends on the other two classes, meaning that in the InitializeAsync of SomeClass1, I need to access the SomeClass2 and SomeClass3 and I also need it to be already initialized.
Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions