Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
## Ignore Visual Studio and Rider temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates
launchSettings.json

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
.vs/
tools
!tools/packages.config

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.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

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# 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
*.Publish.xml

# NuGet Packages Directory
packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Rider specific folder
\.idea/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.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


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# 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

# =========================
# NUnit Specific
# =========================

.~
*.userprefs
*.StyleCop
*.sdf
GeneratedAssemblyInfo.cs
StyleCop.Cache
local.settings.include
InternalTrace.txt
TestResult.xml
testCaseCollection.xml
deploy
lib
test-results
package
images
MockAssemblyResult.xml
PortabilityAnalysis*.html
project.lock.json
*.project.lock.json
.dotnet
.config/dotnet-tools.json
41 changes: 20 additions & 21 deletions BDD/BerlinClockFeatureSteps.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
using System;
using TechTalk.SpecFlow;
using BerlinClock.Interfaces;
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;
[Binding]
public class TheBerlinClockSteps
{
private ITimeConverter berlinClock = new BerlinClockTimeConverter();
private string theTime;


[When(@"the time is ""(.*)""")]
public void WhenTheTimeIs(string time)
{
this.theTime = time;
}


[When(@"the time is ""(.*)""")]
public void WhenTheTimeIs(string time)
{
theTime = time;
}

[Then(@"the clock should look like")]
public void ThenTheClockShouldLookLike(string theExpectedBerlinClockOutput)
{
Assert.AreEqual(berlinClock.convertTime(theTime), theExpectedBerlinClockOutput);
}
[Then(@"the clock should look like")]
public void ThenTheClockShouldLookLike(string theExpectedBerlinClockOutput)
{
Assert.AreEqual(this.berlinClock.ConvertTime(this.theTime), theExpectedBerlinClockOutput);
}

}
}
}
9 changes: 7 additions & 2 deletions BerlinClock.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,18 @@
</ItemGroup>
<ItemGroup>
<Compile Include="BDD\BerlinClockFeatureSteps.cs" />
<Compile Include="Classes\Utils\StringHelper.cs" />
<Compile Include="Interfaces\Clock\BerlinClockModel.cs" />
<Compile Include="Classes\Clock\ViewFormats\BerlinClockCharViewFormat.cs" />
<Compile Include="Interfaces\Clock\ViewFormats\IBerlinClockViewFormat.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="BDD\BerlinClockFeatureSteps.feature.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>BerlinClockFeatureSteps.feature</DependentUpon>
</Compile>
<Compile Include="Classes\ITimeConverter.cs" />
<Compile Include="Classes\TimeConverter.cs" />
<Compile Include="Interfaces\ITimeConverter.cs" />
<Compile Include="Classes\BerlinClockTimeConverter.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand All @@ -70,6 +74,7 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
13 changes: 11 additions & 2 deletions BerlinClock.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BerlinClock", "BerlinClock.csproj", "{0451204D-BF86-43E1-B560-FC9AC830B9A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BerlinClockNUnitTest", "BerlinClockNUnitTest\BerlinClockNUnitTest.csproj", "{69310066-B9EC-4A1F-85E2-E1F6D8F015ED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,8 +17,15 @@ Global
{0451204D-BF86-43E1-B560-FC9AC830B9A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0451204D-BF86-43E1-B560-FC9AC830B9A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0451204D-BF86-43E1-B560-FC9AC830B9A9}.Release|Any CPU.Build.0 = Release|Any CPU
{69310066-B9EC-4A1F-85E2-E1F6D8F015ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69310066-B9EC-4A1F-85E2-E1F6D8F015ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69310066-B9EC-4A1F-85E2-E1F6D8F015ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69310066-B9EC-4A1F-85E2-E1F6D8F015ED}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E8033423-7F55-436F-96A2-24BE7E6C8B42}
EndGlobalSection
EndGlobal
19 changes: 19 additions & 0 deletions BerlinClockNUnitTest/BerlinClockNUnitTest.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BerlinClock.csproj" />
</ItemGroup>

</Project>
Loading