We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it possible to raise an event based on a type found by It.Is? Put an example in the test below.
[TestCase] public void Raise_NonStaticEventBasedOnMatch_OriginalEventInvokesSubscribers() { int invocationCount = 0; Smock.Run(context => { ClassWithEvents instance = new ClassWithEvents(); instance.TheEvent += (sender, args) => ++invocationCount; instance.RaiseTheEvent(EventArgs.Empty); context.Raise(() => It.IsAny<ClassWithEvents>().TheEvent += null, () => It.IsAny<ClassWithEvents>().TheEvent -= null, EventArgs.Empty); }); Assert.AreEqual(2, invocationCount); }
Thanks for the great plugin. Dennis
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is it possible to raise an event based on a type found by It.Is? Put an example in the test below.
Thanks for the great plugin.
Dennis
The text was updated successfully, but these errors were encountered: