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

Add Assert.Raises overloads for Action #2900

Closed
bradwilson opened this issue Mar 21, 2024 Discussed in #2899 · 1 comment
Closed

Add Assert.Raises overloads for Action #2900

bradwilson opened this issue Mar 21, 2024 Discussed in #2899 · 1 comment

Comments

@bradwilson
Copy link
Member

Discussed in #2899

Originally posted by TimKEviden March 21, 2024
Hey there!

I have the case where a public event Action<MyEventArgs> is invoked.
I want to write a test to ensure that it is really invoked when I need it to be invoked.
While trying to implement it in my test I did not get to run as I always get the error
Cannot implicitly conevert type 'System.EventHandler<MyEventArgs> to System.Action<MyEventArgs>'.

I am currently using version 2.7.0

Is there a reason for only EventHandlers being supported?

Best wishes!

@bradwilson
Copy link
Member Author

Available in v2: 2.7.1-pre.10
Available in v3: 0.1.1-pre.387

https://xunit.net/docs/using-ci-builds

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

No branches or pull requests

1 participant