Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with other Xunit.TestFrameworks #103

Open
harish-venkataramanan-cko opened this issue Nov 27, 2023 · 5 comments
Open

Usage with other Xunit.TestFrameworks #103

harish-venkataramanan-cko opened this issue Nov 27, 2023 · 5 comments

Comments

@harish-venkataramanan-cko

Is your feature request related to a problem? Please describe.
Yes, the issue is, this library solves a real problem, and therefore it is very useful.
However, since it has its own XunitTestFramework and that type is sealed, it is very much impossible to use it along with another custom XunitFramework for solving another important problem, eg: writing BDD style tests in Xunit

Describe the solution you'd like
Could you please suggest a consistent way in which we can mix and match other XunitTestFrameworks? Maybe, the XunitTestFramework implementation in this library is not sealed so that we can create another framework implementation by inheriting from that?

Describe alternatives you've considered
I cannot see any other solution at the moment

@pengweiqhca
Copy link
Owner

pengweiqhca commented Nov 28, 2023

Integrate with other XunitTestFrameworks is complicated. Could you provide the package name? I will try to find the solution as much as possible.

@harish-venkataramanan-cko
Copy link
Author

@pengweiqhca Thanks a lot for the response, it is either LightBDD or BDDfy

@tkeerthivel
Copy link

tkeerthivel commented Dec 13, 2023

@pengweiqhca I use this package in our framework. But now, I also want to use AssemblyFixture, which requires declaring custom framework as mentioned here - https://github.com/xunit/samples.xunit/blob/main/AssemblyFixtureExample/Samples.cs. Is there any way for this?

@pengweiqhca
Copy link
Owner

@pengweiqhca I use this package in our framework. But now, I also want to use AssemblyFixture, which requires declaring custom framework as mentioned here - https://github.com/xunit/samples.xunit/blob/main/AssemblyFixtureExample/Samples.cs. Is there any way for this?

@tkeerthivel service.AddSingleton<MyAssemblyFixture>()

@tkeerthivel
Copy link

@pengweiqhca It needed to work with IAsyncLifeTime and after some research in #67 I found about IHostedService which exactly solves my requirement. Thank you. Appreciate your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants