From 9a81bc9b93a81b31bb165bc6fb3e14beaf3a5024 Mon Sep 17 00:00:00 2001 From: Steven Giesel Date: Mon, 27 Jun 2022 22:44:01 +0200 Subject: [PATCH] fix: Added missing opening tag (#775) --- docs/site/docs/providing-input/substituting-components.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/site/docs/providing-input/substituting-components.md b/docs/site/docs/providing-input/substituting-components.md index d2fa75511..2d38c191b 100644 --- a/docs/site/docs/providing-input/substituting-components.md +++ b/docs/site/docs/providing-input/substituting-components.md @@ -76,7 +76,7 @@ ctx.ComponentFactories.AddStub("
NOT FROM BAR
"); // Add the markup specified in the render fragment to the rendered // output instead of that from . -ctx.ComponentFactories.AddStub(@div>NOT FROM BAR); +ctx.ComponentFactories.AddStub(@
NOT FROM BAR
); ``` It is also possible to access the parameter that is passed to the substituted component, both when specifying alternative render output or when verifying the correct parameters was passed to the substituted component. For example, suppose `` has a parameter named `Baz`: @@ -88,7 +88,7 @@ ctx.ComponentFactories.AddStub(parameters => $"
{parameters.Get(x => Ba // Add the markup produced by the render template to the rendered // output instead of that from . -ctx.ComponentFactories.AddStub(parameters => @div>@(parameters.Get(x => Baz))
); +ctx.ComponentFactories.AddStub(parameters => @
@(parameters.Get(x => Baz))
); ``` To verify that the expected value was passed to the `Baz` parameter of ``, first find the substituted component in the render tree using the `FindComponent`/`FindComponents` methods, and then inspect the `Parameters` property. E.g.: @@ -136,7 +136,7 @@ ctx.ComponentFactories.AddStub(type => type.Namespace == "Third.Party.Lib", // Add the markup produced by the render fragment to the rendered // output instead of the components that match the predicate. ctx.ComponentFactories.AddStub(type => type.Namespace == "Third.Party.Lib", - @div>NOT FROM BAR); + @
NOT FROM BAR
); ``` ### Creating a mock component with mocking libraries