- macOS, Linux or Windows
- git client
- curl command line utility
- a working build environment (.NET 8.0) for C#
git clone https://github.com/murex/Kata-BowlingGame.git
cd Kata-BowlingGame/csharp
You can run the kata from the command line or from your IDE of choice.
You may also run it using TCR if you want to add a bit of spice.
- From a terminal
- From a terminal with TCR
- From Visual Studio
- From Visual Studio with TCR
- From Visual Studio Code
- From Visual Studio Code with TCR
Reminder: the commands below should be run from Kata-BowlingGame/csharp directory
To build the project:
dotnet build
To run the tests:
dotnet test
Note to Windows users
Use a git bash terminal for running the command below. Windows CMD and PowerShell are not supported
Reminder: the command below should be run from Kata-BowlingGame/csharp directory
Type the following to start TCR:
./tcrw
Refer to Using TCR section for additional details about TCR and available options.
Supported Versions: Visual Studio 2017 or later
Open Visual Studio, choose Open a project or solution
, navigate to
the location containing the cloned kata repository, and open the solution file:
Kata-BowlingGame
/ csharp
/ Kata-BowlingGame.sln
After loading the solution:
- Make sure the 'BowlingGame.Test' project is set as the Start-up Project.
- Run the project (press
F5
or click onLocal Window Debugger
in the toolbar). - You can also use the
Test Explorer
window to run and browse all the executed tests.
TCR is provided as a command line utility running in a terminal. You can run it from Visual Studio directly, through leveraging on its built-in terminal.
Notes
- Supported Versions: Visual Studio 2019 or later
- Visual Studio 2017 and earlier versions are not supported as they do not have a built-in terminal.
Open Visual Studio, choose Open a project or solution
, navigate to
the location containing the cloned kata repository, and open the solution file:
Kata-BowlingGame
/ csharp
/ Kata-BowlingGame.sln
Windows Only
Skip this step if you're on macOS or Linux
Visual Studio for Windows is usually set up to run PowerShell by default in its built-in terminal. TCR does not run in PowerShell.
Tools
> Options
> Environment
> Terminal
> Add
Parameter | Set value to |
---|---|
Name: |
Git Bash |
Shell location: |
C:\Program Files\Git\bin\bash.exe |
Arguments: |
The above Shell location
value is for a default git installation location.
You may need to adjust it in case you have installed git at a different location.
Don't forget to click the Apply
button when done.
View
> Terminal
If Git Bash is not set as the default environment for Visual Studio built-in terminal,
click in the terminal title bar on the dropdown arrow button to the right of title,
and select Git Bash
from the dropdown list.
Reminder: the command below should be run from Kata-BowlingGame/csharp directory
From the built-in terminal:
./tcrw
Refer to Using TCR section for additional details about TCR and available options.
Open Visual Studio Code, choose Open Folder
, navigate to Kata-BowlingGame
/ csharp
then click Select Folder
.
Once the project is opened in Visual Studio Code, select Run
> Run Without Debugging
ro run the tests.
TCR is provided as a command line utility running in a terminal. You can run it from Visual Studio Code directly, through leveraging on its built-in terminal.
Open Visual Studio Code, choose Open Folder
, navigate to Kata-BowlingGame
/ csharp
then click Select Folder
.
TCR is constantly watching the filesystem for changes. For this reason you need to make sure that Visual Studio Code's auto-save is turned off in order for TCR to behave as expected.
File
> Preferences
> Settings
In Text Editor
> Files
section, make sure that Auto Save
setting is set to off
Windows Only
Skip this step if you're on macOS or Linux
Visual Studio Code for Windows is usually set up to run PowerShell by default in its built-in terminal. TCR does not run in PowerShell.
File
> Preferences
> Settings
In Features
> Terminal
section, set External: Windows Exec
to C:\Program Files\Git\bin\bash.exe
The above path is for a default git installation location. You may need to adjust it in case you have installed git at a different location.
Terminal
> New Terminal
Reminder: the command below should be run from Kata-BowlingGame/csharp directory
From the built-in terminal:
./tcrw
Refer to Using TCR section for additional details about TCR and available options.
Here are the main shortcuts available once TCR utility is running:
Shortcut | Description |
---|---|
o / O |
Open in browser (with web subcommand only) |
d / D |
Enter driver role |
n / N |
Enter navigator role |
t / T |
Query timer status |
p / P |
Toggle on/off git auto-push |
l / L |
Pull from remote |
s / S |
Push to remote |
a / A |
Abort current command (when in driver role) |
q / Q |
Quit current role / Quit TCR |
? |
List available options |
Refer to TCR - Test && Commit || Revert page for additional details and explanations about TCR utility.