devlooped / xunit.assemblyfixture

Provides per-assembly fixture state support for xunit
MIT License
26 stars 12 forks source link

Support IAsyncLifetime? #25

Open AlexeyRaga opened 1 year ago

AlexeyRaga commented 1 year ago

Are there any plans for supporting IAsyncLifetime for assembly fixtures?

This would be extremely handy for things like API testing, etc.

Back this issue Back this issue

emahiq commented 11 months ago

I'd love to see this implemented. We regularly do async cleanup in the dispose method, and I'd love to await that properly.

Any progress?

siewers commented 10 months ago

Have you seen https://github.com/JDCain/Xunit.Extensions.AssemblyFixture? It supports IAsyncLifetime.

AlexeyRaga commented 10 months ago

@siewers I think I looked long time ago. Not sure how maintained that project though, it hasn't been touched for years... Does it work well?

siewers commented 10 months ago

I've been using it for years. There's only a single issue that I've reported that hasn't been fixed, but besides that, it has worked without issues for me. My primary usage is the teardown and setup of my test database and for that, the IAsyncLifetime works as it should.