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

feat: Add templates for xunit.v3 #1634

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

linkdotnet
Copy link
Collaborator

Added another template for xunit.v3.

@egil
Copy link
Member

egil commented Dec 17, 2024

Should we upgrade dependencies on the other templates too?

@egil
Copy link
Member

egil commented Dec 17, 2024

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

@linkdotnet
Copy link
Collaborator Author

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

My understanding is that you either use the static object aka TestContext.Current or via DI ITestContextAccessor - so we should be safe.

@linkdotnet
Copy link
Collaborator Author

Should we upgrade dependencies on the other templates too?

Sure why not

@linkdotnet linkdotnet force-pushed the xunitv3-templates branch 2 times, most recently from e774a7e to 043b206 Compare December 17, 2024 19:14
@linkdotnet linkdotnet force-pushed the xunitv3-templates branch 2 times, most recently from e4bd142 to 7a366f2 Compare December 17, 2024 19:26
@linkdotnet
Copy link
Collaborator Author

I did the following:

  • Added the xunit.v3 template
  • Updated dependencies
  • Removed net6.0 and net7.0 from our target framework choices as they are EOL

@linkdotnet linkdotnet requested a review from egil December 17, 2024 19:50
@linkdotnet
Copy link
Collaborator Author

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

You were right - there are conflicts.

Copy link
Member

@egil egil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent

@egil
Copy link
Member

egil commented Dec 17, 2024

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

You were right - there are conflicts.

Than we can change our default import to be:

using BunitContext = Bunit.TestContext;

@linkdotnet
Copy link
Collaborator Author

using BunitContext = Bunit.TestContext;

You mean for that specific template? It might be confusing and less verbose (especially regarding all our docs).
Therefore I opted out of this behavior.

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

Successfully merging this pull request may close these issues.

2 participants