Refactoring c# projects (#544)

Small Refactoring c# projects, e.g.
* add days
* remove StartupObject
* Fix Approval tests for NUnit
* Use Environment.NewLine in Xunit tests
* Added + fixed README.md
* Removed global.json
This commit is contained in:
Stef Heyenrath authored and GitHub committed 2024-06-06 14:13:44 +02:00
1 parent a348b20789
commit 99f2fcbf18
17 files changed
+263 -236

No files matched your search

+14 -13
View File
@@ -1,23 +1,24 @@
# Gilded Rose starting position in Csharp Core
# Gilded Rose starting position in C# NUnit
## Build the project
Use your normal build tools.
Use your normal build tools to build the projects in Debug mode.
For example, you can use the `dotnet` command line tool:
## Run the TextTest fixture from the Command-Line
``` cmd
dotnet build GildedRose.sln -c Debug
```
## Run the Gilded Rose Command-Line program
For e.g. 10 days:
```
GildedRoseTests/bin/Debug/net8.0/GildedRoseTests 10
``` cmd
GildedRose/bin/Debug/net8.0/GildedRose 10
```
You should make sure the command shown above works when you execute it in a terminal before trying to use TextTest (see below). If your tooling has placed the executable somewhere else, you will need to adjust the path above.
## Run the TextTest approval test that comes with this project
There are instructions in the [TextTest Readme](../texttests/README.md) for setting up TextTest. You will need to specify the GildedRoseTests executable and interpreter in [config.gr](../texttests/config.gr). Uncomment this line:
executable:${TEXTTEST_HOME}/csharpcore/GildedRoseTests/bin/Debug/net8.0/GildedRoseTests
## Run all the unit tests
``` cmd
dotnet test
```