Skip to content

Rework the documentation page#877

Merged
egil merged 6 commits intobUnit-dev:stablefrom
pBouillon:stable
Oct 8, 2022
Merged

Rework the documentation page#877
egil merged 6 commits intobUnit-dev:stablefrom
pBouillon:stable

Conversation

@pBouillon
Copy link
Contributor

@pBouillon pBouillon commented Oct 3, 2022

Resolve #869

Changed the source branche according to #875 and fix the documentation as suggested in #869

@pBouillon pBouillon mentioned this pull request Oct 3, 2022
@egil
Copy link
Member

egil commented Oct 3, 2022

Thanks, I'll take a look tomorrow.

@linkdotnet
Copy link
Collaborator

Very cool @pBouillon !

Install the template from NuGet using this command:

```dotnetcli
dotnet new --install bunit.template
Copy link
Collaborator

@linkdotnet linkdotnet Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super small nitpick: I guess in other parts we're using dotnet new install witout the two dashes --

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh your right. Can we make a note that from .net 7 the syntax is slightly different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good, yes. Just drop the "preview 2" part, and just write ".NET 7".

Copy link
Member

@egil egil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, a few comments:


**2. Create a new test project**

Use the following command to create a bUnit with xUnit test project:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be clear enough for you?

Suggested change
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:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does sound better, I'll change it 😄

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

@pBouillon
Copy link
Contributor Author

Hey @egil, your suggestions should now have been applied, let me know if anything needs to be updated!

Copy link
Member

@egil egil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good.

@egil egil merged commit 25da511 into bUnit-dev:stable Oct 8, 2022
@pBouillon pBouillon deleted the stable branch October 8, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants