diff --git a/csharpcore/GildedRoseTests/TextTestFixture.cs b/csharpcore/GildedRoseTests/TextTestFixture.cs index 41048211..89c48e79 100644 --- a/csharpcore/GildedRoseTests/TextTestFixture.cs +++ b/csharpcore/GildedRoseTests/TextTestFixture.cs @@ -40,7 +40,7 @@ public static class TextTestFixture var app = new GildedRose(items); - int days = 31; + int days = 2; if (args.Length > 0) { days = int.Parse(args[0]) + 1; diff --git a/csharpcore/README.md b/csharpcore/README.md new file mode 100644 index 00000000..c87c016f --- /dev/null +++ b/csharpcore/README.md @@ -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 + diff --git a/texttests/config.gr b/texttests/config.gr index 9beda74b..cb0d082c 100755 --- a/texttests/config.gr +++ b/texttests/config.gr @@ -28,8 +28,8 @@ diff_program:meld #executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb #interpreter:ruby -# Settings for the C# version -#executable:${TEXTTEST_HOME}/csharp/bin/Debug/csharp.exe +# Settings for the C# Core version +#executable:${TEXTTEST_HOME}/csharpcore/GildedRoseTests/bin/Debug/net7.0/GildedRoseTests # Settings for the Perl version #executable:${TEXTTEST_HOME}/perl/texttest_fixture.pl