-
Consider the following two components:
Component B:
When unit testing clicking the button in component A, I ideally only want to assert that ComponentB.Show() was called. |
Beta Was this translation helpful? Give feedback.
Answered by
egil
Oct 28, 2020
Replies: 1 comment 2 replies
-
Something like this should work: var cut = RenderComponent<ComponentA>();
cut.Find("button").Click();
Assert.IsTrue(cut.Markup.StartsWith("Hello world")); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
egil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like this should work: