diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..61198423 --- /dev/null +++ b/.gitignore @@ -0,0 +1,134 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.svclog +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.azurePubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +## TODO: If the tool you use requires repositories.config, also uncomment the next line +!packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +![Ss]tyle[Cc]op.targets +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml + +*.publishsettings + +# 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 + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +_NCrunch* +/.vs diff --git a/BDD/BerlinClockFeatureSteps.cs b/BDD/BerlinClockFeatureSteps.cs index 4390f3cb..1d8c9b97 100644 --- a/BDD/BerlinClockFeatureSteps.cs +++ b/BDD/BerlinClockFeatureSteps.cs @@ -1,27 +1,29 @@ -using System; -using TechTalk.SpecFlow; +using BerlinClock.Classes; +using BerlinClock.Classes.BusinessLogic; +using BerlinClock.Classes.Input; +using BerlinClock.Classes.Output; using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Linq; +using TechTalk.SpecFlow; namespace BerlinClock { [Binding] public class TheBerlinClockSteps { - private ITimeConverter berlinClock = new TimeConverter(); - private String theTime; + private readonly ITimeConverter _berlinClock = new TimeConverter(new TimeParser(), new MatrixConverter(), new MatrixPrinter()); + private string _theTime; + - [When(@"the time is ""(.*)""")] public void WhenTheTimeIs(string time) { - theTime = time; + _theTime = time; } - + [Then(@"the clock should look like")] public void ThenTheClockShouldLookLike(string theExpectedBerlinClockOutput) { - Assert.AreEqual(berlinClock.convertTime(theTime), theExpectedBerlinClockOutput); + Assert.AreEqual(theExpectedBerlinClockOutput, _berlinClock.ConvertTime(_theTime)); } } diff --git a/BerlinClock.csproj b/BerlinClock.csproj index ac8af99d..561f3465 100644 --- a/BerlinClock.csproj +++ b/BerlinClock.csproj @@ -50,6 +50,16 @@ + + + + + + + + + + True @@ -70,6 +80,7 @@ +