MiniScaffold 0.37.1

Edit this page

Adding a Testing project

This tutorial will show you how to add a test project to your solution. We will be using the projTest argument to create a project called MyNewLibrary.Tests. This template assumes you've already created a solution using the Tutorial.

Steps

  1. Open a terminal and navigate to the tests/ directory of your project:
    • cd tests/
  2. Run dotnet new to create a new library project. dotnet new mini-scaffold -n MyNewLibrary.Tests --outputType projLib
  3. Navigate back to thr root of the repository and add the project to the solution file.
    • cd ..
    • dotnet sln add src/MyNewLibrary.Tests/MyNewLibrary.Tests.fsproj
  4. Optionally, add a reference to the project you want to test.
    • dotnet add src/MyNewLibrary.Tests/MyNewLibrary.Tests.fsproj reference src/MyNewLibrary/MyNewLibrary.fsproj

Further Reading