Rework the documentation page#877
Conversation
|
Thanks, I'll take a look tomorrow. |
|
Very cool @pBouillon ! |
| Install the template from NuGet using this command: | ||
|
|
||
| ```dotnetcli | ||
| dotnet new --install bunit.template |
There was a problem hiding this comment.
Super small nitpick: I guess in other parts we're using dotnet new install witout the two dashes --
There was a problem hiding this comment.
Hey, thank you for the review!
I might be doing something wrong here but dotnet new install bunit.template is not running on my side, did I get the command wrong?
There was a problem hiding this comment.
Ahh no sorry. The new syntax is from >= .net 7 preview 2 onwards. I guess you are using .net 6.
@egil For the sake of correctness, we should revert the other change as well as people still can use .net 6 for a while. So sorry for the noise @pBouillon
There was a problem hiding this comment.
Ohh your right. Can we make a note that from .net 7 the syntax is slightly different?
There was a problem hiding this comment.
I can do that, would something like this do the trick ?
1. Install the template
Install the template from NuGet using this command:
dotnet new --install bunit.template
Or, from .NET 7 preview 2 onwards:
dotnet new install bunit.template
There was a problem hiding this comment.
That looks good, yes. Just drop the "preview 2" part, and just write ".NET 7".
|
|
||
| **2. Create a new test project** | ||
|
|
||
| Use the following command to create a bUnit with xUnit test project: |
There was a problem hiding this comment.
Let's also add something about its now possible to create a project using the bUnit template directly in VS, so you do not have to use the command line from this point.
There was a problem hiding this comment.
Would this be clear enough for you?
| Use the following command to create a bUnit with xUnit test project: | |
| If you successfully installed the template listed in the previous section, you | |
| may create a new project directly from the Visual Studio (or Rider) wizard in | |
| your listed project templates. | |
| Otherwise, use one of the following command to create a bUnit test project with | |
| the framework of your choice: |
There was a problem hiding this comment.
Lets word it like this:
If you successfully installed the template listed in the previous section, you
can create a new project directly from the "Create new project" wizard in Visual Studio (or Rider), where the bUnit project type will also show up.
There was a problem hiding this comment.
It does sound better, I'll change it 😄
Co-authored-by: Egil Hansen <[email protected]>
Co-authored-by: Egil Hansen <[email protected]>
| @@ -9,6 +9,67 @@ To write tests, you need a place to put them - a test project. bUnit is not a un | |||
|
|
|||
| To use bUnit, the easiest approach is to use the bUnit project template described in the [Create a test project with bUnit template](#creating-a-test-project-with-bunit-template) section further down the page. To create a test project manually and in a general-purpose testing frameworks agnostic way, read the following section. | |||
There was a problem hiding this comment.
| To use bUnit, the easiest approach is to use the bUnit project template described in the [Create a test project with bUnit template](#creating-a-test-project-with-bunit-template) section further down the page. To create a test project manually and in a general-purpose testing frameworks agnostic way, read the following section. | |
| To use bUnit, the easiest approach is to use the bUnit project template described in the following section. To create a test project manually and in a general-purpose testing frameworks agnostic way, read the section [Create a new test project](#create-a-new-test-project) section further down the page. |
|
|
||
| To quickly get started with bUnit, install and use the [bUnit test project template](https://www.nuget.org/packages/bunit.template/). | ||
|
|
||
| The steps for creating a test project with the bUnit template are as follows: |
There was a problem hiding this comment.
| The steps for creating a test project with the bUnit template are as follows: | |
| The steps for creating a test project with the bUnit template are as follows: |
Remove additional whitespace.
|
Hey @egil, your suggestions should now have been applied, let me know if anything needs to be updated! |
Resolve #869
Changed the source branche according to #875 and fix the documentation as suggested in #869