Skip to content

Commit

Permalink
Fixed code sample reference mistakes in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
egil committed Apr 11, 2021
1 parent a87b820 commit d5a961a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This can be done like this:

# [C# test code](#tab/csharp)

[!code-csharp[EventCallbackParamsTest.cs](../../../samples/tests/xunit/EventCallbackParamsTest.cs#L11-L27]
[!code-csharp[EventCallbackParamsTest.cs](../../../samples/tests/xunit/EventCallbackParamsTest.cs#L11-L27)]

The example uses the <xref:Bunit.ComponentParameterCollectionBuilder`1>'s `Add` method, which takes a parameter selector expression that selects the parameter using a lambda, and forces you to provide the correct type of callback method. This makes the builder's methods strongly typed and refactor-safe.

Expand Down Expand Up @@ -349,7 +349,7 @@ To pass all cascading parameters to the `<CascadingParams>` component, do the fo

# [C# test code](#tab/csharp)

[!code-csharp[CascadingParamsTest.cs](../../../samples/tests/xunit/CascadingParams2Test.cs#L11-L26)]
[!code-csharp[CascadingParamsTest.cs](../../../samples/tests/xunit/CascadingParams3Test.cs#L11-L26)]

The example passes both the unnamed `IsDarkTheme` cascading parameter and the two named cascading parameters (`LoggedInUser`, `LoggedInEmail`). It does this using the `Add` method on the <xref:Bunit.ComponentParameterCollectionBuilder`1> with the parameter selector to select both the named and unnamed cascading parameters and pass values to them that way.

Expand Down

0 comments on commit d5a961a

Please sign in to comment.