❔ Using fixtures in xUnit
I've been trying to create some tests for my web application using xUnit (I've just started looking into C# recently, but I mainly use Python)
I wonder if there's a way to "nest" fixtures or use then in each other, for example I can create user in database and then create http client authenticated for that specific user
Here's an example in python + pytest:
2 Replies
xUnit has class fixtures but if I undersand correctly there's no way to inject one fixture into another, for example by specifying it as a dependency in constructor:
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.