Skip to content

Commit 21e484f

Browse files
committed
updates to docs and samples
1 parent bdca10e commit 21e484f

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

docs/readme.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,51 @@ This framework's goal is to make it easy to write _comprehensive, stable unit te
2929
Follow these steps to set up a new test project:
3030

3131
1. Create a new Razor Class Library (`dotnet new razorclasslib`).
32-
2. Add the following package references to your testing library:
3332

34-
- `Razor.Components.Testing.Library`
33+
2. Ensure `TargetFramework` is `netcoreapp3.1`, e.g. set `<TargetFramework>netcoreapp3.1</TargetFramework>` in your .csproj file.
34+
35+
3. Add the following package references to your testing library:
36+
37+
- `Razor.Components.Testing.Library` (make sure to get `1.0.0-beta-1` version)
3538
- `Microsoft.NET.Test.Sdk`
3639
- `xunit.core`
37-
- `xunit.assert`
40+
- `xunit.assert` (can be replaced with `Shouldly` or another assertion library)
3841
- `xunit.runner.visualstudio` (if using Visual Studio)
3942

4043
Optionally, but recommended packages are [`Moq`](https://github.com/Moq) and [`Shouldly`](https://github.com/shouldly). _Moq_ is a good generic mocking library, and _Shouldly_ is a fluent syntax assert library, that makes test more readable and produce easily readable assert errors.
4144

42-
3. Add a reference to the Blazor (class library) project(s) where the components you want to test is located.
45+
4. Add a reference to the Blazor (class library) project(s) where the components you want to test is located.
4346

44-
4. Start writing tests (see examples below to get started).
47+
5. Start writing tests (see examples below to get started).
4548

4649
## Examples
4750

4851
Examples are split into three sections, one for each style/declaration type.
4952

50-
1. [C#-based tests](csharp-examples.md)
51-
2. [Razor/C# mixed-mode tests](razor-examples.md)
52-
3. [Snapshot tests](snapshot-examples.md)
53+
1. [C#-based tests](csharp-examples.md)
54+
Examples of tests written entirely in C#
55+
2. [Razor/C# mixed-mode tests](razor-examples.md)
56+
Examples of tests written in Razor files using Razor code to declare/arrange the component under test and expected HTML, and C# code for driving the test.
57+
3. [Snapshot tests](snapshot-examples.md)
58+
Examples of snapshot tests written in Razor code, where the component under test and expected output is declared in Razor syntax and automatically verified.
5359

5460
## References
5561

56-
See source code documentation for now.
62+
The following sections are planned but not done yet. A lot of the public methods are however documented, so view the documentation in the source code for now.
63+
64+
Upcoming sections:
5765

58-
1. [Semantic HTML diffing options](html-diffing-options.md)
66+
1. [Built-in assertions](#)
67+
2. [Component creation and rendering](#)
68+
3. [Semantic HTML diffing options](#)
5969

6070
## Contribute
6171

6272
To get in touch, ask questions or provide feedback, you can:
6373

64-
- Create a new [issue](https://github.com/egil/razor-components-testing-library/issues)
65-
- Join the library's Gitter channel ([![Gitter](https://badges.gitter.im/razor-components-testing-library/community.svg)](https://gitter.im/razor-components-testing-library/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge))
66-
- Ping me on Twitter ([@egilhansen](https://twitter.com/egilhansen))
74+
- Create a new [issue](https://github.com/egil/razor-components-testing-library/issues).
75+
- Join the library's Gitter channel [![Gitter](https://badges.gitter.im/razor-components-testing-library/community.svg)](https://gitter.im/razor-components-testing-library/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
76+
- Ping me on Twitter: [@egilhansen](https://twitter.com/egilhansen)
6777

6878
There are a few ways you can help improve this library.
6979

0 commit comments

Comments
 (0)