Plan and done for Sep-19-2018
C#
I've started practicing basic C# fluency by taking small assessments on CodeWars. The first logistical question I've got - how to setup a test env for C# projects? My steps (based on many sources but primarily on MS dotnet Core guide) include:
Packages to install (with dotnet add package PackageName):
- NUnit;
- NUnit.Console;
- NUnit.ConsoleRunner;
- NUnit.Runners;
Folders/files setup:
- start a project:
dotnet new console -o "MyAppName"; - initialize a solution
cd MyAppName; dotnet new sln; - initialize a main project
mkdir ProjectName; cd ProjectName; dotnet new classLib; - add the main project to the solution
cd ..; dotnet sln add ./ProjectName/ProjectName.csproj; - initialize a test project
mkdir ProjectName.Tests; cd ProjectName.Tests; dotnet new nunit; - add reference to the main project
dotnet add reference ../ProjectName/ProjectName.csproj; - add the test project to the solution
cd ..; dotnet sln add ./ProjectName.Tests/ProjectName.Tests.csproj;
VSCode extension - .NET Core Test Explorer