This is sample code to get started with C# and C# unit tests.
The goal is for developers to fix the methods (wherever there is a TODO
) until all tests pass.
- Log on to your GitHub account
- Go to
<> Code
, add a Codespace - Log on to your Microsoft identity as suggested
- Open the files
toy/JustSomeCode.cs
andtoy/JustSomeCode.Tests.cs
side by side - Restore the dotnet project using the icon with three hozirontal lines, then
Terminal
,Run Build Task
,dotnet: build
. - Click on the Testing panel icon panel on the left (notice how the tooltip says "Testing").
Run Tests
- Fix the code in
JustSomeCode.cs
so that tests pass :-)
- Clone this repo in VS Code: View, Command Palette, type
Git: Clone
then provide the URL - Install all suggested extensions or use devcontainer
- Log on to your Microsoft identity as suggested
- Open the files
toy/JustSomeCode.cs
andtoy/JustSomeCode.Tests.cs
side by side - Restore the dotnet project using the top menu
Terminal
,Run Build Task
,dotnet: build
. - Click on the Testing panel icon panel on the left (notice how the tooltip says "Testing").
Run Tests
- Fix the code in
JustSomeCode.cs
so that tests pass :-)