diff --git a/.gitignore b/.gitignore
index 1ef5319f..99cec7a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,338 @@
python/.cache
python/.coverage
**/.idea
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
\ No newline at end of file
diff --git a/TestNinja/.DS_Store b/TestNinja/.DS_Store
new file mode 100644
index 00000000..0ca46f20
Binary files /dev/null and b/TestNinja/.DS_Store differ
diff --git a/TestNinja/TestNinja.UnitTests/Properties/AssemblyInfo.cs b/TestNinja/TestNinja.UnitTests/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..57c9c3f5
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/Properties/AssemblyInfo.cs
@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("TestNinja.UnitTests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TestNinja.UnitTests")]
+[assembly: AssemblyCopyright("Copyright © 2018")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("d077ad2c-59bc-41b1-8dba-99113b1ff8a9")]
+
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/TestNinja/TestNinja.UnitTests/TestNinja.UnitTests.csproj b/TestNinja/TestNinja.UnitTests/TestNinja.UnitTests.csproj
new file mode 100644
index 00000000..bd096760
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/TestNinja.UnitTests.csproj
@@ -0,0 +1,76 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {D077AD2C-59BC-41B1-8DBA-99113B1FF8A9}
+ Library
+ Properties
+ TestNinja.UnitTests
+ TestNinja.UnitTests
+ v4.6.1
+ 512
+ {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 15.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+ $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
+ False
+ UnitTest
+
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\..\..\GildedRose-Refactoring-Kata\csharp\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {7328740E-4B78-464F-8352-65D887F2145F}
+ TestNinja
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/CustomerControllerTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/CustomerControllerTests.cs
new file mode 100644
index 00000000..ccba1fce
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/CustomerControllerTests.cs
@@ -0,0 +1,27 @@
+using System.Security.Cryptography.X509Certificates;
+using NUnit.Framework;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class CustomerControllerTests
+ {
+ private CustomerController _customerController;
+
+ [SetUp]
+ public void SetUp()
+ {
+ _customerController = new CustomerController();
+ }
+
+ [Test]
+ public void GetCustomer_IfIdIsGreaterThenZero_ReturnOk()
+ {
+ var result = _customerController.GetCustomer(4);
+ Assert.That(result, Is.InstanceOf());
+ Assert.That(result, Is.TypeOf());
+
+ }
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/DemeritPointsCalculatorTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/DemeritPointsCalculatorTests.cs
new file mode 100644
index 00000000..c6d95daa
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/DemeritPointsCalculatorTests.cs
@@ -0,0 +1,55 @@
+using System;
+using NUnit.Framework;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class DemeritPointsCalculatorTests
+ {
+ private DemeritPointsCalculator _demeritPointsCalculator;
+
+ [SetUp]
+ public void SetUp()
+ {
+ _demeritPointsCalculator = new DemeritPointsCalculator();
+ }
+
+ [Test]
+ public void CalculateDemeritPoints_SpeedIsNegative_ThrowArgumentOutOfRangeException()
+ {
+ Assert.That(() => _demeritPointsCalculator.CalculateDemeritPoints(-9),
+ Throws.Exception.TypeOf());
+ }
+
+ [Test]
+ public void CalculateDemeritPoints_SpeedIsGreaterThenMaxSpeed_ThrowArgumentOutOfRangeException()
+ {
+ Assert.That(() => _demeritPointsCalculator.CalculateDemeritPoints(350),
+ Throws.Exception.TypeOf());
+ }
+
+ [Test]
+ [TestCase(2)]
+ [TestCase(30)]
+ [TestCase(64)]
+ [TestCase(65)]
+ public void CalculateDemeritPoints_SpeedIsLessOrEqualSpeedLimit_ReturnZero(int speed)
+ {
+ var result = _demeritPointsCalculator.CalculateDemeritPoints(speed);
+ Assert.That(result, Is.EqualTo(0));
+ }
+
+ [Test]
+ [TestCase(66, 0)]
+ [TestCase(70, 1)]
+ [TestCase(80, 3)]
+ public void CalculateDemeritPoints_SpeedIsOverSpeedLimit_ReturnDemeritPoints(int speed, int expectedResult)
+ {
+ var result = _demeritPointsCalculator.CalculateDemeritPoints(speed);
+ Assert.That(result, Is.EqualTo(expectedResult));
+ }
+
+
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/ErrorLoggerTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/ErrorLoggerTests.cs
new file mode 100644
index 00000000..8e33dafc
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/ErrorLoggerTests.cs
@@ -0,0 +1,44 @@
+using System;
+using NUnit.Framework;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class ErrorLoggerTests
+ {
+ [Test]
+ public void Log_WhenCalled_SetTheLastErrorProperty()
+ {
+ var errorLogger = new ErrorLogger();
+
+ errorLogger.Log("some error");
+
+ Assert.That(errorLogger.LastError, Is.EqualTo("some error"));
+ }
+
+ [Test]
+ [TestCase(null)]
+ [TestCase("")]
+ [TestCase(" ")]
+ public void Log_InvalidError_ThrowArgumentNullException(string error)
+ {
+ var logger = new ErrorLogger();
+ Assert.That(() => logger.Log(error), Throws.ArgumentNullException);
+ }
+
+ [Test]
+ public void Log_ValidError_RaiseErrorLoggedEvent()
+ {
+ var logger = new ErrorLogger();
+
+ var id = Guid.Empty;
+ logger.ErrorLogged += (sender, args) => { id = args; };
+
+ logger.Log("a");
+
+ Assert.That(id, Is.Not.EqualTo(Guid.Empty));
+
+ }
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/FizzBuzzTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/FizzBuzzTests.cs
new file mode 100644
index 00000000..99d628e2
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/FizzBuzzTests.cs
@@ -0,0 +1,44 @@
+using NUnit.Framework;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class FizzBuzzTests
+ {
+
+ [Test]
+ public void GetOutput_DivisibleBy5And3_ReturnFizzBuzzString()
+ {
+ var result = FizzBuzz.GetOutput(15);
+
+ Assert.That(result, Is.EqualTo("FizzBuzz"));
+ }
+
+ [Test]
+ public void GetOutput_DivisibleBy3Only_ReturnFizzString()
+ {
+ var result = FizzBuzz.GetOutput(3);
+
+ Assert.That(result, Is.EqualTo("Fizz"));
+ }
+
+ [Test]
+ public void GetOutput_DivisibleBy5Only_ReturnBuzzString()
+ {
+ var result = FizzBuzz.GetOutput(5);
+
+ Assert.That(result, Is.EqualTo("Buzz"));
+ }
+
+ [Test]
+ public void GetOutput_NotDivisibleBy5And3_ReturnNumberAsString()
+ {
+ var result = FizzBuzz.GetOutput(4);
+
+ Assert.That(result, Is.EqualTo("4"));
+ }
+
+
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/HtmlFormatterTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/HtmlFormatterTests.cs
new file mode 100644
index 00000000..e54dcc88
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/HtmlFormatterTests.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class HtmlFormatterTests
+ {
+ [Test]
+ public void FormatAsBold_WhenCalled_ShouldEncloseTheStringWithStrongElement()
+ {
+ var formatter = new HtmlFormatter();
+
+ var result = formatter.FormatAsBold("abc");
+
+ //specific assertion
+ Assert.That(result, Is.EqualTo("abc").IgnoreCase);
+
+ //more general
+ Assert.That(result, Does.StartWith(""));
+ Assert.That(result, Does.EndWith(""));
+ Assert.That(result, Does.Contain("abc"));
+
+ }
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/MathTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/MathTests.cs
new file mode 100644
index 00000000..a4cf1f8e
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/MathTests.cs
@@ -0,0 +1,74 @@
+using System.Linq;
+using System.Runtime.ExceptionServices;
+using NUnit.Framework;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class MathTests
+ {
+ private Math _math;
+
+ // SetUp - before tests
+ [SetUp]
+ public void SetUp()
+ {
+ _math = new Math();
+ }
+ // TearDown - after tests
+
+
+ [Test]
+ [TestCase(1,2,3)]
+ [TestCase(0, 0, 0)]
+ [TestCase(10,20,30)]
+ public void Add_WhenCalled_ReturnTheSUmOfArguments(int first, int second, int expectedResult)
+ {
+ var result = _math.Add(first, second);
+
+ Assert.That(result, Is.EqualTo(expectedResult));
+ }
+
+ [Test]
+ [Ignore("Because I wanted to!")]
+ public void Max_FirstArgumentIsGreater_ReturnTheFirstArgument()
+ {
+ var result = _math.Max(5, 2);
+ Assert.That(result, Is.EqualTo(5));
+ }
+
+ [Test]
+ public void Max_SecondArgumentIsGreater_ReturnTheSecondArgument()
+ {
+ var result = _math.Max(5, 15);
+ Assert.That(result, Is.EqualTo(15));
+ }
+
+ [Test]
+ public void Max_ArgumentsAreEqual_ReturnTheSameArgumentArgument()
+ {
+ var result = _math.Max(10, 10);
+ Assert.That(result, Is.EqualTo(10));
+ }
+
+ [Test]
+ public void GetOddNumbers_limitIsGreaterThanZero_ReturnOddNumbersUpToLimit()
+ {
+ var result = _math.GetOddNumbers(5);
+
+ Assert.That(result, Is.Not.Empty);
+ Assert.That(result.Count(), Is.EqualTo(3));
+ Assert.That(result, Does.Contain(1));
+ Assert.That(result, Does.Contain(3));
+ Assert.That(result, Does.Contain(5));
+
+ Assert.That(result, Is.EquivalentTo(new [] {1, 3, 5}));
+
+ Assert.That(result, Is.Ordered);
+ Assert.That(result, Is.Unique);
+
+
+ }
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/ReservationTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/ReservationTests.cs
new file mode 100644
index 00000000..cac523d0
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/ReservationTests.cs
@@ -0,0 +1,65 @@
+using NUnit.Framework;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ public class ReservationTests
+ {
+ [Test]
+ public void CanBeCancelledBy_AdminCancelling_ReturnsTrue()
+ {
+ //Arrange
+ var reservation = new Reservation();
+
+ //Act
+ var result = reservation.CanBeCancelledBy(new User { IsAdmin = true });
+
+ //Assert
+ Assert.That(result, Is.True);
+ }
+
+ [Test]
+ public void CanBeCancelledBy_AdminCancelling_ReturnsFalse()
+ {
+ //Arrange
+ var reservation = new Reservation();
+
+ //Act
+ var result = reservation.CanBeCancelledBy(
+ new User { IsAdmin = false });
+
+ //Assert
+ Assert.IsFalse(result);
+ Assert.That(result, Is.False);
+ }
+
+ [Test]
+ public void CanBeCancelledBy_SameUserCancellingTheReservation_ReturnTrue()
+ {
+ var user = new User();
+ var reservation = new Reservation
+ {
+ MadeBy = user
+ };
+
+ var result = reservation.CanBeCancelledBy(user);
+
+ Assert.IsTrue(result);
+ }
+
+ [Test]
+ public void CanBeCancelledBy_AnotherUserCancellingTheReservation_ReturnFalse()
+ {
+ var user = new User();
+ var reservation = new Reservation
+ {
+ MadeBy = user
+ };
+
+ var result = reservation.CanBeCancelledBy(new User());
+
+ Assert.IsFalse(result);
+ }
+ }
+}
diff --git a/TestNinja/TestNinja.UnitTests/UnitTests/StackTests.cs b/TestNinja/TestNinja.UnitTests/UnitTests/StackTests.cs
new file mode 100644
index 00000000..e737893e
--- /dev/null
+++ b/TestNinja/TestNinja.UnitTests/UnitTests/StackTests.cs
@@ -0,0 +1,85 @@
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+using TestNinja.Fundamentals;
+
+namespace TestNinja.UnitTests.UnitTests
+{
+ [TestFixture]
+ class StackTests
+ {
+ [Test]
+ public void Push_PassNull_ThrowArgumentNullException()
+ {
+ var stack = new Stack