make sure texttests work for C#

This commit is contained in:
emily 2023-11-03 16:18:25 +01:00
parent 8588b6fcc4
commit e188faef86
3 changed files with 26 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public static class TextTestFixture
var app = new GildedRose(items); var app = new GildedRose(items);
int days = 31; int days = 2;
if (args.Length > 0) if (args.Length > 0)
{ {
days = int.Parse(args[0]) + 1; days = int.Parse(args[0]) + 1;

23
csharpcore/README.md Normal file
View File

@ -0,0 +1,23 @@
# Gilded Rose starting position in Csharp Core
## Build the project
Use your normal build tools.
## Run the TextTest fixture from the Command-Line
For e.g. 10 days:
```
GildedRoseTests/bin/Debug/net7.0/GildedRoseTests 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/net7.0/GildedRoseTests

View File

@ -28,8 +28,8 @@ diff_program:meld
#executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb #executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb
#interpreter:ruby #interpreter:ruby
# Settings for the C# version # Settings for the C# Core version
#executable:${TEXTTEST_HOME}/csharp/bin/Debug/csharp.exe #executable:${TEXTTEST_HOME}/csharpcore/GildedRoseTests/bin/Debug/net7.0/GildedRoseTests
# Settings for the Perl version # Settings for the Perl version
#executable:${TEXTTEST_HOME}/perl/texttest_fixture.pl #executable:${TEXTTEST_HOME}/perl/texttest_fixture.pl