From cfd7be2e21c2a5a0f47f263cad88c377f4b3646f Mon Sep 17 00:00:00 2001 From: Steven Giesel Date: Wed, 26 Apr 2023 10:21:34 +0200 Subject: [PATCH] Merge stable into main (#1050) * docs: Use TestContext as base class for Passing parameters to components (#1034) * refactor: Use TestContext as base class * fixes to docs * Indent size 2 * fix getting started and index --------- Co-authored-by: Egil Hansen * docs: broken sample code * doc: fixes to sample code to make it compile * docs: added CounterTest.razor * docs: fix code references, added missing samples * docs: change code ref to correct type --------- Co-authored-by: Egil Hansen --- docs/site/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/index.md b/docs/site/index.md index 5e4e94618..c091b29d7 100644 --- a/docs/site/index.md +++ b/docs/site/index.md @@ -30,7 +30,7 @@ Let’s write a test for the `` component listed below. This comes with To do this, you can carry out the following using bUnit and xUnit: -[!code-csharp[CounterTest.cs](../samples/tests/razor/CounterTest.razor)] +[!code-cshtml[CounterTest.razor](../samples/tests/razor/CounterTest.razor)] This test uses bUnit's test context to render the `Counter` component with the `Render` method. It then finds the button the component rendered and clicks it with the `Find` and `Click` methods. Finally, it finds the paragraph (`

`) element and verifies that it matches the expected markup passed to the MarkupMatches method.