Adding Drone to 'Unit testing C# in .NET Core using dotnet test and xUnit.'
Go to file
James Skemp 3f941cf0d6 Add Drone config to run tests 2023-08-06 10:57:36 -05:00
PrimeService Add new basic .NET 7 project with unit testing 2023-08-06 10:33:47 -05:00
PrimeService.Tests Add new basic .NET 7 project with unit testing 2023-08-06 10:33:47 -05:00
.drone.yml Add Drone config to run tests 2023-08-06 10:57:36 -05:00
.gitignore Add new basic .NET 7 project with unit testing 2023-08-06 10:33:47 -05:00
README.md Add new basic .NET 7 project with unit testing 2023-08-06 10:33:47 -05:00
unit-testing-using-dotnet-test.sln Add new basic .NET 7 project with unit testing 2023-08-06 10:33:47 -05:00

README.md

Adding Drone to 'Unit testing C# in .NET Core using dotnet test and xUnit'

dotnet new sln -o unit-testing-using-dotnet-test
cd unit-testing-using-dotnet-test
dotnet new classlib -o PrimeService
ren .\PrimeService\Class1.cs PrimeService.cs
dotnet sln add ./PrimeService/PrimeService.csproj
dotnet new xunit -o PrimeService.Tests
dotnet add ./PrimeService.Tests/PrimeService.Tests.csproj reference ./PrimeService/PrimeService.csproj
dotnet sln add ./PrimeService.Tests/PrimeService.Tests.csproj

dotnet new gitignore
git init

Next add actual code to PrimeService.cs and create tests.

From the root, run dotnet test.