From fd5a90186e3eecd3a0f9d696820d2c8b9859bb86 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Wed, 10 Aug 2016 21:17:23 +0200 Subject: [PATCH] Build improvements - Use Paket for dependency management - Normalize test file names - Fix not all tests being run --- .gitignore | 2 + .paket/paket.bootstrapper.exe | Bin 0 -> 28208 bytes .travis.yml | 6 +- appveyor.yml | 4 +- build.cmd | 14 +++ build.fsx | 93 ++++++++--------- build.ps1 | 36 ------- build.sh | 71 ++++++------- exercises/atbash-cipher/AtbashTest.cs | 1 - .../beer-song/{BeerTests.cs => BeerTest.cs} | 0 exercises/binary/BinaryTest.cs | 1 - ...resTests.cs => DifferenceOfSquaresTest.cs} | 0 exercises/exercises.csproj | 97 ++++++++++++++++++ exercises/hexadecimal/HexadecimalTest.cs | 1 - exercises/octal/OctalTest.cs | 1 - exercises/paket.references | 1 + exercises/roman-numerals/RomanNumeralsTest.cs | 3 - ...SaddlePointTests.cs => SaddlePointTest.cs} | 0 ...ndshakeTests.cs => SecretHandshakeTest.cs} | 0 exercises/tournament/TournamentTest.cs | 90 ++++++++-------- exercises/trinary/TrinaryTest.cs | 1 - paket.dependencies | 4 + paket.lock | 5 + 23 files changed, 243 insertions(+), 188 deletions(-) create mode 100644 .paket/paket.bootstrapper.exe create mode 100644 build.cmd delete mode 100644 build.ps1 rename exercises/beer-song/{BeerTests.cs => BeerTest.cs} (100%) rename exercises/difference-of-squares/{DifferenceOfSquaresTests.cs => DifferenceOfSquaresTest.cs} (100%) create mode 100644 exercises/exercises.csproj create mode 100644 exercises/paket.references rename exercises/saddle-points/{SaddlePointTests.cs => SaddlePointTest.cs} (100%) rename exercises/secret-handshake/{SecretHandshakeTests.cs => SecretHandshakeTest.cs} (100%) create mode 100644 paket.dependencies create mode 100644 paket.lock diff --git a/.gitignore b/.gitignore index 4d7f4fa653..ab5fc9d8a5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,9 @@ tmp bin/configlet bin/configlet.exe .fake/ +.paket/paket.exe .vs/ tools/ build/ +packages/ TestResult.xml \ No newline at end of file diff --git a/.paket/paket.bootstrapper.exe b/.paket/paket.bootstrapper.exe new file mode 100644 index 0000000000000000000000000000000000000000..64fdf248bfcf48ee396f801e8a8a266b85974238 GIT binary patch literal 28208 zcmeHw34Bz=vUi^|GiR10lgwmg2@HY25RzfSB8zMx2@nJlNLU5JWO9-WOfuoj1QHNT zP*GIeLE*v$MMc~f+^(W{Q4tlr?i(VaqN1pPUU&Td)#uC-0^a-H_rBkIzwh@3r%qRO zb$4}jb#-;0o;Z2VHB84C)8qTcAB;VQCw<0n_~)P%+1BoVv$CD${XHHNChhN0QRfRf z8kIn;;;DCdJq-+MV}f3nG`T6$z@e4Bwc~7%0T0$o>ErNmi1Xbiiie8}k{%*w`49CugDm^dZ?q zW?;V!WbE!C47wAEIaVW_?_Yr~Zh`d!lfalw0cf;{&Nz%>ZWqxB*(`C!Kmwsg^=Ub% z>wS<(IZVJX!J1e`Z>9r-aJv|=f=_{MHY%L}0*OGy^Z@uQqRwfAYylh6InRquJDwrr z3)w1bGVtv50EW+!Evl@kl46@2CgqCo46d^*XLx3x)nSD0_Leo;0X{6VFFKpfR3pgJOKh! zr4o4JLDAU@t)Wq9QWEu~JV`V-G0!B?s;5E1)8K^mr5u!oy{V;n0t9oIz!M;#q{_h) zot4oTEh>p&SLr;VMB2qrP`l7KwF^~a_@N^`yA&EiKQ+4vW<$(4(TP!%jLKv(0cSMX z8=3KG3H?T!lkUjJc9A0Qq~j0!AQy%5QW#xP4D<6hLIbLLXThP*hXOkjCQpOLve0NDW+V>q~=9Cfq8|li>#dW2&t|?WJB4U>(u^; zET1jf6z-eIK0x1$WaooXZ{QpNi{!){mUID30ZXn`pJ!24qoaI&dBj z#Pl#RcXN7RI0!4js?W|#@4XU}OMgo8p`PHm$jEM`92)F?;whJwHQA?~n_+ z+o)`Yg8QYOAv=9zLU0}z&!#t}xpis%Ovbd0&LXrGm<&3o=_)l{qauJHYKBV9(5O>6 zm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}{n)j^P_fu8wKWm4)HM-R4`KIl@ho_wP zz-Lt}7N2|RGh15oE^}sm?j4$bGWW{geww&%{_I|RJ0+~hta*FS{_o^}zBK%fJ*k-+ z?8#j|dU0Utu{2*&)6`BMw|vMZjCGIt+bCgImwoxptt-=SAKz*6s;sdW>r=lPuyo`d wUz$#yyKc<=6%W3B;?>UcKDgKPTlT3N9v^xAs5WKj8{W5jee%ZP%ao!22i#P(>;M1& literal 0 HcmV?d00001 diff --git a/.travis.yml b/.travis.yml index 7b3f8bb74a..379b999eb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: csharp script: - - bin/fetch-configlet - - bin/configlet . - - build.sh \ No newline at end of file + - ./bin/fetch-configlet + - ./bin/configlet . + - ./build.sh \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 7fc7af9c36..2fe5df9633 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,2 +1,4 @@ build_script: -- ps: .\build.ps1 \ No newline at end of file +- ps: .\build.cmd + +test: off \ No newline at end of file diff --git a/build.cmd b/build.cmd new file mode 100644 index 0000000000..29cd7d86c3 --- /dev/null +++ b/build.cmd @@ -0,0 +1,14 @@ +@echo off +cls + +.paket\paket.bootstrapper.exe +if errorlevel 1 ( + exit /b %errorlevel% +) + +.paket\paket.exe restore +if errorlevel 1 ( + exit /b %errorlevel% +) + +packages\FAKE\tools\FAKE.exe build.fsx %* \ No newline at end of file diff --git a/build.fsx b/build.fsx index 752b5f63b4..47d548a3b0 100644 --- a/build.fsx +++ b/build.fsx @@ -1,68 +1,61 @@ // Include Fake library -#r "tools/FAKE/tools/FakeLib.dll" +#r "./packages/FAKE/tools/FakeLib.dll" open Fake -open Fake.CscHelper open Fake.Testing.NUnit3 -// Properties -let sourceDir = "./exercises/" -let buildDir = getBuildParamOrDefault "buildDir" "./build/" -let buildExampleDir = buildDir @@ "example" -let buildTestDir = buildDir @@ "test" -let exampleDll = buildExampleDir @@ "example.dll" -let testDll = buildTestDir @@ "test.dll" -let nunitFrameworkDll = "tools/NUnit/lib/net45/nunit.framework.dll" +// Directories +let buildDir = "./build/" +let sourceDir = "./exercises/" -let exampleSourceFiles() = !! (buildExampleDir @@ "./**/*.cs") |> List.ofSeq -let testSourceFiles() = !! (buildTestDir @@ "./**/*.cs") |> List.ofSeq - -let compile output files = - files - |> Csc (fun p -> - { p with Output = output - References = [nunitFrameworkDll] - Target = Library }) +// Files +let solutionFile = buildDir @@ "/exercises.csproj" +let compiledOutput = buildDir @@ "xcsharp.dll" // Targets -Target "CleanExamples" (fun _ -> CleanDir buildExampleDir) -Target "CleanTests" (fun _ -> CleanDir buildTestDir) +Target "PrepareUnchanged" (fun _ -> + CleanDirs [buildDir] + CopyDir buildDir sourceDir allFiles +) -Target "CopyExamples" (fun _ -> CopyDir buildExampleDir sourceDir allFiles) -Target "CopyTests" (fun _ -> CopyDir buildTestDir sourceDir allFiles) +Target "BuildUnchanged" (fun _ -> + MSBuildRelease buildDir "Build" [solutionFile] + |> Log "Build unchanged output: " +) Target "PrepareTests" (fun _ -> - testSourceFiles() - |> ReplaceInFiles [("[Ignore(\"Remove to run test\")]", ""); (", Ignore = \"Remove to run test case\"", "")] + CleanDirs [buildDir] + CopyDir buildDir sourceDir allFiles + + let ignorePattern = "(\[Ignore\(\"Remove to run test\"\)]|, Ignore = \"Remove to run test case\")" + + !! (buildDir @@ "**/*Test.cs") + |> RegexReplaceInFilesWithEncoding ignorePattern "" System.Text.Encoding.UTF8 ) -Target "CompileExamples" (fun _ -> exampleSourceFiles() |> compile exampleDll) -Target "CompileTests" (fun _ -> testSourceFiles() |> compile testDll) +Target "BuildTests" (fun _ -> + MSBuildRelease buildDir "Build" [solutionFile] + |> Log "Build tests output: " +) Target "Test" (fun _ -> - Copy buildTestDir [nunitFrameworkDll] - - [testDll] - |> NUnit3 (fun p -> - { p with - ShadowCopy = false }) + if getEnvironmentVarAsBool "APPVEYOR" then + [compiledOutput] + |> NUnit3 (fun p -> { p with + ShadowCopy = false + ToolPath = @"C:\Tools\NUnit3\bin\nunit3-console.exe" + ResultSpecs = ["myresults.xml;format=AppVeyor"] }) + else + [compiledOutput] + |> NUnit3 (fun p -> { p with ShadowCopy = false }) ) -Target "Build" (fun _ -> ()) -Target "Default" (fun _ -> ()) - -"CleanExamples" - ==> "CopyExamples" - ==> "CompileExamples" - ==> "Build" +// Build order +"PrepareUnchanged" + ==> "BuildUnchanged" + ==> "PrepareTests" + ==> "BuildTests" + ==> "Test" -"CleanTests" - ==> "CopyTests" - ==> "PrepareTests" - ==> "CompileTests" - ==> "Test" - -"Build" ==> "Default" -"Test" ==> "Default" - -RunTargetOrDefault "Default" \ No newline at end of file +// start build +RunTargetOrDefault "Test" \ No newline at end of file diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 6f17b6da10..0000000000 --- a/build.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -$toolsDirectory = Join-Path $PSScriptRoot "tools" -$nugetDirectory = Join-Path $toolsDirectory "nuget" -$nugetExe = Join-Path $nugetDirectory "nuget.exe" -$fakeExe = Join-Path $toolsDirectory "fake/tools/fake.exe" -$nunitFrameworkDll = Join-Path $toolsDirectory "nunit/lib/net45/nunit.framework.dll" -$nunitConsoleExe = Join-Path $toolsDirectory "nunit.console/tools/nunit3-console.exe" - -If (!(Test-Path $nugetExe)) { - # Ensure the directory exists (which is required by DownloadFile) - New-Item $nugetDirectory -Type Directory | Out-Null - - $nugetUrl = "https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe" - (New-Object System.Net.WebClient).DownloadFile($nugetUrl, $nugetExe) -} - -If (!(Test-Path $nugetExe)) { - Throw "Could not find nuget.exe" -} - -& $nugetExe install FAKE -Version 4.17.1 -ExcludeVersion -OutputDirectory $toolsDirectory -If (!(Test-Path $fakeExe)) { - Throw "Could not find fake.exe" -} - -& $nugetExe install NUnit -Version 3.0.1 -ExcludeVersion -OutputDirectory $toolsDirectory -If (!(Test-Path $nunitFrameworkDll)) { - Throw "Could not find nunit.framework.dll" -} - -& $nugetExe install NUnit.Console -Version 3.0.1 -ExcludeVersion -OutputDirectory $toolsDirectory -If (!(Test-Path $nunitConsoleExe)) { - Throw "Could not find nunit3-console.exe" -} - -# Use FAKE to execute the build script -& $fakeExe $args \ No newline at end of file diff --git a/build.sh b/build.sh index 283d678645..374d5a0a0c 100755 --- a/build.sh +++ b/build.sh @@ -1,46 +1,33 @@ -#!/usr/bin/env bash +#!/bin/bash +if test "$OS" = "Windows_NT" +then + # use .Net -currentDirectory="$( cd "$( dirname "$0" )" && pwd )" -toolsDirectory=$currentDirectory/tools -nugetDirectory=$toolsDirectory/nuget -nugetExe=$nugetDirectory/nuget.exe -fakeExe=$toolsDirectory/FAKE/tools/FAKE.exe -nunitFrameworkDll=$toolsDirectory/NUnit/lib/net45/nunit.framework.dll -nunitConsoleExe=$toolsDirectory/NUnit.Console/tools/nunit3-console.exe + .paket/paket.bootstrapper.exe + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi -if test ! -d $nugetDirectory; then - mkdir -p $nugetDirectory -fi + .paket/paket.exe restore + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi -if test ! -f $nugetExe; then - nugetUrl="https://dist.nuget.org/win-x86-commandline/v3.3.0/nuget.exe" - wget -O $nugetExe $nugetUrl 2> /dev/null || curl -o $nugetExe --location $nugetUrl /dev/null - - if test ! -f $nugetExe; then - echo "Could not find nuget.exe" - exit 1 - fi - - chmod 755 $nugetExe -fi + packages/FAKE/tools/FAKE.exe $@ --fsiargs build.fsx +else + # use mono + mono .paket/paket.bootstrapper.exe + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi -mono $nugetExe install FAKE -Version 4.17.1 -ExcludeVersion -OutputDirectory $toolsDirectory -if test ! -f $fakeExe; then - echo "Could not find fake.exe" - exit 1 -fi - -mono $nugetExe install NUnit -Version 3.0.1 -ExcludeVersion -OutputDirectory $toolsDirectory -if test ! -f $nunitFrameworkDll; then - echo "Could not find nunit.framework.dll" - exit 1 -fi - -mono $nugetExe install NUnit.Console -Version 3.0.1 -ExcludeVersion -OutputDirectory $toolsDirectory -if test ! -f $nunitConsoleExe; then - echo "Could not find nunit3-console.exe" - exit 1 -fi - -# Use FAKE to execute the build script -mono $fakeExe build.fsx $@ \ No newline at end of file + mono .paket/paket.exe restore + exit_code=$? + if [ $exit_code -ne 0 ]; then + exit $exit_code + fi + mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx +fi \ No newline at end of file diff --git a/exercises/atbash-cipher/AtbashTest.cs b/exercises/atbash-cipher/AtbashTest.cs index f1dfcf442d..5f197fe2c5 100644 --- a/exercises/atbash-cipher/AtbashTest.cs +++ b/exercises/atbash-cipher/AtbashTest.cs @@ -3,7 +3,6 @@ [TestFixture] public class AtbashTest { - // change Ignore to false to run test case or just remove 'Ignore = true' [TestCase("no", ExpectedResult = "ml")] [TestCase("yes", ExpectedResult = "bvh", Ignore = "Remove to run test case")] [TestCase("OMG", ExpectedResult = "lnt", Ignore = "Remove to run test case")] diff --git a/exercises/beer-song/BeerTests.cs b/exercises/beer-song/BeerTest.cs similarity index 100% rename from exercises/beer-song/BeerTests.cs rename to exercises/beer-song/BeerTest.cs diff --git a/exercises/binary/BinaryTest.cs b/exercises/binary/BinaryTest.cs index a0f2285d8c..faf54e618a 100644 --- a/exercises/binary/BinaryTest.cs +++ b/exercises/binary/BinaryTest.cs @@ -3,7 +3,6 @@ [TestFixture] public class BinaryTest { - // change Ignore to false to run test case or just remove 'Ignore = true' [TestCase("1", ExpectedResult = 1)] [TestCase("10", ExpectedResult = 2, Ignore = "Remove to run test case")] [TestCase("11", ExpectedResult = 3, Ignore = "Remove to run test case")] diff --git a/exercises/difference-of-squares/DifferenceOfSquaresTests.cs b/exercises/difference-of-squares/DifferenceOfSquaresTest.cs similarity index 100% rename from exercises/difference-of-squares/DifferenceOfSquaresTests.cs rename to exercises/difference-of-squares/DifferenceOfSquaresTest.cs diff --git a/exercises/exercises.csproj b/exercises/exercises.csproj new file mode 100644 index 0000000000..cf39f91924 --- /dev/null +++ b/exercises/exercises.csproj @@ -0,0 +1,97 @@ + + + + + Debug + AnyCPU + {FEF69435-D885-45DD-A446-04FD3BD3F593} + Library + Properties + xcsharp + xcsharp + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + ..\packages\NUnit\lib\net20\NUnit.System.Linq.dll + True + True + + + ..\packages\NUnit\lib\net20\nunit.framework.dll + True + True + + + + + + + ..\packages\NUnit\lib\net35\nunit.framework.dll + True + True + + + + + + + ..\packages\NUnit\lib\net40\nunit.framework.dll + True + True + + + + + + + ..\packages\NUnit\lib\net45\nunit.framework.dll + True + True + + + + + + + ..\packages\NUnit\lib\portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10\nunit.framework.dll + True + True + + + + + \ No newline at end of file diff --git a/exercises/hexadecimal/HexadecimalTest.cs b/exercises/hexadecimal/HexadecimalTest.cs index f0974ac97a..71b3078900 100644 --- a/exercises/hexadecimal/HexadecimalTest.cs +++ b/exercises/hexadecimal/HexadecimalTest.cs @@ -3,7 +3,6 @@ [TestFixture] public class HexadecimalTest { - // change Ignore to false to run test case or just remove 'Ignore = true' [TestCase("1", ExpectedResult = 1)] [TestCase("c", ExpectedResult = 12, Ignore = "Remove to run test case")] [TestCase("10", ExpectedResult = 16, Ignore = "Remove to run test case")] diff --git a/exercises/octal/OctalTest.cs b/exercises/octal/OctalTest.cs index 1832219e54..a613c816c8 100644 --- a/exercises/octal/OctalTest.cs +++ b/exercises/octal/OctalTest.cs @@ -3,7 +3,6 @@ [TestFixture] public class OctalTest { - // change Ignore to false to run test case or just remove 'Ignore = true' [TestCase("1", ExpectedResult = 1)] [TestCase("10", ExpectedResult = 8, Ignore = "Remove to run test case")] [TestCase("17", ExpectedResult = 15, Ignore = "Remove to run test case")] diff --git a/exercises/paket.references b/exercises/paket.references new file mode 100644 index 0000000000..77bef3865c --- /dev/null +++ b/exercises/paket.references @@ -0,0 +1 @@ +NUnit \ No newline at end of file diff --git a/exercises/roman-numerals/RomanNumeralsTest.cs b/exercises/roman-numerals/RomanNumeralsTest.cs index add830fc14..69c24238d9 100644 --- a/exercises/roman-numerals/RomanNumeralsTest.cs +++ b/exercises/roman-numerals/RomanNumeralsTest.cs @@ -3,9 +3,6 @@ [TestFixture] public class RomanNumeralsTest { - // Change 'Ignore = true' to 'Ignore = false' to run a test case. - // You can also just remove 'Ignore = true'. - [TestCase(0, ExpectedResult = "")] [TestCase(1, ExpectedResult = "I", Ignore = "Remove to run test case")] [TestCase(2, ExpectedResult = "II", Ignore = "Remove to run test case")] diff --git a/exercises/saddle-points/SaddlePointTests.cs b/exercises/saddle-points/SaddlePointTest.cs similarity index 100% rename from exercises/saddle-points/SaddlePointTests.cs rename to exercises/saddle-points/SaddlePointTest.cs diff --git a/exercises/secret-handshake/SecretHandshakeTests.cs b/exercises/secret-handshake/SecretHandshakeTest.cs similarity index 100% rename from exercises/secret-handshake/SecretHandshakeTests.cs rename to exercises/secret-handshake/SecretHandshakeTest.cs diff --git a/exercises/tournament/TournamentTest.cs b/exercises/tournament/TournamentTest.cs index ca7b63adab..6daa4a92f6 100644 --- a/exercises/tournament/TournamentTest.cs +++ b/exercises/tournament/TournamentTest.cs @@ -6,59 +6,53 @@ [TestFixture] public class TournamentTest { - readonly string input1 = @" -Αllegoric Alaskians;Blithering Badgers;win -Devastating Donkeys;Courageous Californians;draw -Devastating Donkeys;Αllegoric Alaskians;win -Courageous Californians;Blithering Badgers;loss -Blithering Badgers;Devastating Donkeys;loss -Αllegoric Alaskians;Courageous Californians;win -".Trim(); + readonly string input1 = + "Αllegoric Alaskians;Blithering Badgers;win" + Environment.NewLine + + "Devastating Donkeys;Courageous Californians;draw" + Environment.NewLine + + "Devastating Donkeys;Αllegoric Alaskians;win" + Environment.NewLine + + "Courageous Californians;Blithering Badgers;loss" + Environment.NewLine + + "Blithering Badgers;Devastating Donkeys;loss" + Environment.NewLine + + "Αllegoric Alaskians;Courageous Californians;win".Trim(); - readonly string input2 = @" -Allegoric Alaskians;Blithering Badgers;win -Devastating Donkeys_Courageous Californians;draw -Devastating Donkeys;Allegoric Alaskians;win - -Courageous Californians;Blithering Badgers;loss -Bla;Bla;Bla -Blithering Badgers;Devastating Donkeys;loss -# Yackity yackity yack -Allegoric Alaskians;Courageous Californians;win -Devastating Donkeys;Courageous Californians;draw -Devastating Donkeys@Courageous Californians;draw -"; // Trim() omitted by design + private readonly string input2 = + "Allegoric Alaskians;Blithering Badgers;win" + Environment.NewLine + + "Devastating Donkeys_Courageous Californians;draw" + Environment.NewLine + + "Devastating Donkeys;Allegoric Alaskians;win" + Environment.NewLine + + "" + Environment.NewLine + + "Courageous Californians;Blithering Badgers;loss" + Environment.NewLine + + "Bla;Bla;Bla" + Environment.NewLine + + "Blithering Badgers;Devastating Donkeys;loss" + Environment.NewLine + + "# Yackity yackity yack" + Environment.NewLine + + "Allegoric Alaskians;Courageous Californians;win" + Environment.NewLine + + "Devastating Donkeys;Courageous Californians;draw" + Environment.NewLine + + "Devastating Donkeys@Courageous Californians;draw"; // Trim() omitted by design - readonly string input3 = @" -Allegoric Alaskians;Blithering Badgers;win -Devastating Donkeys;Allegoric Alaskians;win -Courageous Californians;Blithering Badgers;loss -Allegoric Alaskians;Courageous Californians;win -".Trim(); + private readonly string input3 = + "Allegoric Alaskians;Blithering Badgers;win" + Environment.NewLine + + "Devastating Donkeys;Allegoric Alaskians;win" + Environment.NewLine + + "Courageous Californians;Blithering Badgers;loss" + Environment.NewLine + + "Allegoric Alaskians;Courageous Californians;win".Trim(); - readonly string expected1 = @" -Team | MP | W | D | L | P -Devastating Donkeys | 3 | 2 | 1 | 0 | 7 -Αllegoric Alaskians | 3 | 2 | 0 | 1 | 6 -Blithering Badgers | 3 | 1 | 0 | 2 | 3 -Courageous Californians | 3 | 0 | 1 | 2 | 1 -".Trim(); + readonly string expected1 = + "Team | MP | W | D | L | P" + Environment.NewLine + + "Devastating Donkeys | 3 | 2 | 1 | 0 | 7" + Environment.NewLine + + "Αllegoric Alaskians | 3 | 2 | 0 | 1 | 6" + Environment.NewLine + + "Blithering Badgers | 3 | 1 | 0 | 2 | 3" + Environment.NewLine + + "Courageous Californians | 3 | 0 | 1 | 2 | 1".Trim(); - readonly string expected2 = @" -Team | MP | W | D | L | P -Devastating Donkeys | 3 | 2 | 1 | 0 | 7 -Allegoric Alaskians | 3 | 2 | 0 | 1 | 6 -Blithering Badgers | 3 | 1 | 0 | 2 | 3 -Courageous Californians | 3 | 0 | 1 | 2 | 1 -".Trim(); + private readonly string expected2 = + "Team | MP | W | D | L | P" + Environment.NewLine + + "Devastating Donkeys | 3 | 2 | 1 | 0 | 7" + Environment.NewLine + + "Allegoric Alaskians | 3 | 2 | 0 | 1 | 6" + Environment.NewLine + + "Blithering Badgers | 3 | 1 | 0 | 2 | 3" + Environment.NewLine + + "Courageous Californians | 3 | 0 | 1 | 2 | 1".Trim(); - readonly string expected3 = @" -Team | MP | W | D | L | P -Allegoric Alaskians | 3 | 2 | 0 | 1 | 6 -Blithering Badgers | 2 | 1 | 0 | 1 | 3 -Devastating Donkeys | 1 | 1 | 0 | 0 | 3 -Courageous Californians | 2 | 0 | 0 | 2 | 0 -".Trim(); + private readonly string expected3 = + "Team | MP | W | D | L | P" + Environment.NewLine + + "Allegoric Alaskians | 3 | 2 | 0 | 1 | 6" + Environment.NewLine + + "Blithering Badgers | 2 | 1 | 0 | 1 | 3" + Environment.NewLine + + "Devastating Donkeys | 1 | 1 | 0 | 0 | 3" + Environment.NewLine + + "Courageous Californians | 2 | 0 | 0 | 2 | 0".Trim(); private string RunTally(string input) { diff --git a/exercises/trinary/TrinaryTest.cs b/exercises/trinary/TrinaryTest.cs index 8909dad0c9..c3e15004ea 100644 --- a/exercises/trinary/TrinaryTest.cs +++ b/exercises/trinary/TrinaryTest.cs @@ -3,7 +3,6 @@ [TestFixture] public class TrinaryTest { - // change Ignore to false to run test case or just remove 'Ignore = true' [TestCase("1", ExpectedResult = 1)] [TestCase("2", ExpectedResult = 2, Ignore = "Remove to run test case")] [TestCase("10", ExpectedResult = 3, Ignore = "Remove to run test case")] diff --git a/paket.dependencies b/paket.dependencies new file mode 100644 index 0000000000..94065bd2ce --- /dev/null +++ b/paket.dependencies @@ -0,0 +1,4 @@ +source https://www.nuget.org/api/v2/ +nuget FAKE +nuget NUnit +nuget NUnit.ConsoleRunner \ No newline at end of file diff --git a/paket.lock b/paket.lock new file mode 100644 index 0000000000..d0804d08d0 --- /dev/null +++ b/paket.lock @@ -0,0 +1,5 @@ +NUGET + remote: https://www.nuget.org/api/v2 + FAKE (4.37.2) + NUnit (3.4.1) + NUnit.ConsoleRunner (3.4.1)