Skip to content

Commit 498002b

Browse files
committed
Docs: razor based test examples
1 parent 54f0cb0 commit 498002b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/site/docs/getting-started/writing-razor-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Let's see a simple example, where we test the following `<HelloWorld>` component
6969

7070
Here is the Razor code that tests the `<HelloWorld>` component:
7171

72-
[!code-html[HelloWorldTest.razor](../../../samples/tests/razor/HelloWorldTest.razor#L21-L28)]
72+
[!code-html[HelloWorldTest.razor](../../../samples/tests/razor/HelloWorldTest.razor?range=1-2,21-28)]
7373

7474
Let's break down what is going on in this test with the <xref:Bunit.SnapshotTest> component:
7575

@@ -88,7 +88,7 @@ Since we are declaring our component under test in Razor syntax, passing paramet
8888

8989
In this example, we are passing both attribute parameters and child content to the component under test, in this case, a basic `<Alert>` component:
9090

91-
[!code-html[HelloWorldTest.razor](../../../samples/tests/razor/PassingParametersToComponents.razor#L3-L18)]
91+
[!code-html[](../../../samples/tests/razor/PassingParametersToComponents.razor)]
9292

9393
Injecting services into the components under test is covered on the <xref:inject-services-into-components> page.
9494

docs/site/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ Shout outs and a big thank you [to all the contributors](https://github.com/egil
7272
- Provide feedback and input through [issues](https://github.com/egil/bunit/issues), [Twitter](https://twitter.com/egilhansen) or [bUnit Gitter chat room](https://gitter.im/egil/bunit).
7373
- Help build the library, just pick an issue and submit pull-requests.
7474
- Help write documentation.
75-
- Create blog posts, presentations or video tutorials. If you do, I will be happy to showcase them in the related section on this site.
75+
- Create blog posts, presentations or video tutorials. If you do, I will be happy to showcase them in the [related section](xref:external-resources) on this site.

0 commit comments

Comments
 (0)