From 023af28f3ccfcf9f10568f98a0072581b5caafab Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sun, 2 Jun 2024 22:02:24 +0200 Subject: [PATCH] Added + fixed README.md Removed global.json --- csharp.NUnit/GildedRose.sln | 11 ++++-- .../GildedRoseTests/GildedRoseTests.csproj | 34 +++++++++---------- csharp.NUnit/README.md | 27 ++++++++------- csharp.NUnit/global.json | 7 ---- csharp.xUnit/GildedRose.sln | 11 ++++-- csharp.xUnit/README.md | 24 +++++++++++++ csharp.xUnit/global.json | 7 ---- 7 files changed, 71 insertions(+), 50 deletions(-) delete mode 100644 csharp.NUnit/global.json create mode 100644 csharp.xUnit/README.md delete mode 100644 csharp.xUnit/global.json diff --git a/csharp.NUnit/GildedRose.sln b/csharp.NUnit/GildedRose.sln index f2ce64a1..fc591ee5 100644 --- a/csharp.NUnit/GildedRose.sln +++ b/csharp.NUnit/GildedRose.sln @@ -1,11 +1,16 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31424.327 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34916.146 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GildedRose", "GildedRose\GildedRose.csproj", "{D781C52B-92C0-48BF-8414-177495DF4174}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GildedRoseTests", "GildedRoseTests\GildedRoseTests.csproj", "{CB6715CE-A283-4C70-9C1B-F58822077731}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GildedRoseTests", "GildedRoseTests\GildedRoseTests.csproj", "{CB6715CE-A283-4C70-9C1B-F58822077731}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{848F53B4-A532-4386-9DC3-1A477E7D6FCF}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/csharp.NUnit/GildedRoseTests/GildedRoseTests.csproj b/csharp.NUnit/GildedRoseTests/GildedRoseTests.csproj index 6f9111eb..c84df6ce 100644 --- a/csharp.NUnit/GildedRoseTests/GildedRoseTests.csproj +++ b/csharp.NUnit/GildedRoseTests/GildedRoseTests.csproj @@ -1,23 +1,23 @@  - - Exe - net8.0 - + + Exe + net8.0 + - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + - - - + + + \ No newline at end of file diff --git a/csharp.NUnit/README.md b/csharp.NUnit/README.md index b80b0c0a..8e1eaea9 100644 --- a/csharp.NUnit/README.md +++ b/csharp.NUnit/README.md @@ -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 +``` \ No newline at end of file diff --git a/csharp.NUnit/global.json b/csharp.NUnit/global.json deleted file mode 100644 index 7cd6a1f4..00000000 --- a/csharp.NUnit/global.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "sdk": { - "version": "7.0.0", - "rollForward": "latestMajor", - "allowPrerelease": true - } -} \ No newline at end of file diff --git a/csharp.xUnit/GildedRose.sln b/csharp.xUnit/GildedRose.sln index f2ce64a1..59e41407 100644 --- a/csharp.xUnit/GildedRose.sln +++ b/csharp.xUnit/GildedRose.sln @@ -1,11 +1,16 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31424.327 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34916.146 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GildedRose", "GildedRose\GildedRose.csproj", "{D781C52B-92C0-48BF-8414-177495DF4174}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GildedRoseTests", "GildedRoseTests\GildedRoseTests.csproj", "{CB6715CE-A283-4C70-9C1B-F58822077731}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GildedRoseTests", "GildedRoseTests\GildedRoseTests.csproj", "{CB6715CE-A283-4C70-9C1B-F58822077731}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C4DC2F6D-79E1-4AFB-8B3E-9305F18439CE}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/csharp.xUnit/README.md b/csharp.xUnit/README.md new file mode 100644 index 00000000..92b3cb9e --- /dev/null +++ b/csharp.xUnit/README.md @@ -0,0 +1,24 @@ +# Gilded Rose starting position in C# xUnit + +## Build the project + +Use your normal build tools to build the projects in Debug mode. +For example, you can use the `dotnet` command line tool: + +``` cmd +dotnet build GildedRose.sln -c Debug +``` + +## Run the Gilded Rose Command-Line program + +For e.g. 10 days: + +``` cmd +GildedRose/bin/Debug/net8.0/GildedRose 10 +``` + +## Run all the unit tests + +``` cmd +dotnet test +``` \ No newline at end of file diff --git a/csharp.xUnit/global.json b/csharp.xUnit/global.json deleted file mode 100644 index 7cd6a1f4..00000000 --- a/csharp.xUnit/global.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "sdk": { - "version": "7.0.0", - "rollForward": "latestMajor", - "allowPrerelease": true - } -} \ No newline at end of file