diff --git a/CSharp/FakeItTillYouMakeIt/CounterDisplay.jar b/CSharp/FakeItTillYouMakeIt/CounterDisplay.jar new file mode 100644 index 0000000..6464c05 Binary files /dev/null and b/CSharp/FakeItTillYouMakeIt/CounterDisplay.jar differ diff --git a/CSharp/FakeItTillYouMakeIt/FakeItTillYouMakeIt.csproj b/CSharp/FakeItTillYouMakeIt/FakeItTillYouMakeIt.csproj index 03a4b70..7c686ab 100644 --- a/CSharp/FakeItTillYouMakeIt/FakeItTillYouMakeIt.csproj +++ b/CSharp/FakeItTillYouMakeIt/FakeItTillYouMakeIt.csproj @@ -35,6 +35,18 @@ 4 + + ..\packages\ApprovalTests.3.0.12\lib\net40\ApprovalTests.dll + True + + + ..\packages\ApprovalUtilities.3.0.12\lib\net45\ApprovalUtilities.dll + True + + + ..\packages\ApprovalUtilities.3.0.12\lib\net45\ApprovalUtilities.Net45.dll + True + @@ -53,6 +65,9 @@ + + + diff --git a/CSharp/FakeItTillYouMakeIt/FizzBuzzTest.cs b/CSharp/FakeItTillYouMakeIt/FizzBuzzTest.cs index 5e69064..7db443e 100644 --- a/CSharp/FakeItTillYouMakeIt/FizzBuzzTest.cs +++ b/CSharp/FakeItTillYouMakeIt/FizzBuzzTest.cs @@ -1,4 +1,7 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Linq; +using ApprovalTests.Utilities; +using ApprovalUtilities.Utilities; +using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FizzBuzzFake { @@ -7,6 +10,14 @@ public class FizzBuzzTest { [TestMethod] public void TestFizzBuzz() + { + var java = PathUtilities.LocateFileFromEnviormentPath("javaw.exe"); + var counterDisplayJar = PathUtilities.GetAdjacentFile("CounterDisplay.jar"); + TestCounter.ResetAndLaunch(java.FirstOrDefault(), counterDisplayJar);// Comment out after 1st run + TestCounter.Track(Check20); + } + + private static void Check20() { string expected = "1,2,Fizz,4,Buzz,Fizz,7,8,Fizz,Buzz,11,Fizz,13,14,FizzBuzz,16,17,Fizz,19,Buzz"; Assert.AreEqual(expected, FizzBuzz.Print(20));