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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vs/BerlinClock/v16
bin/Debug
obj/Debug
packages
BerlinClock.v12.suo
22 changes: 11 additions & 11 deletions App.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<specFlow>
<unitTestProvider name="MsTest" />
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --></specFlow>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<specFlow>
<unitTestProvider name="MsTest" />
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --></specFlow>
</configuration>
56 changes: 28 additions & 28 deletions BDD/BerlinClockFeatureSteps.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
using System;
using TechTalk.SpecFlow;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;

namespace BerlinClock
{
[Binding]
public class TheBerlinClockSteps
{
private ITimeConverter berlinClock = new TimeConverter();
private String theTime;


[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);
}

}
}
using System;
using TechTalk.SpecFlow;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;
using BerlinClock.Interfaces;
namespace BerlinClock
{
[Binding]
public class TheBerlinClockSteps
{
private ITimeConverter berlinClock = new TimeConverter();
private String theTime;
[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);
}
}
}
102 changes: 51 additions & 51 deletions BDD/BerlinClockFeatureSteps.feature
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@

Feature: The Berlin Clock
As a clock enthusiast
I want to tell the time using the Berlin Clock
So that I can increase the number of ways that I can read the time


Scenario: Midnight 00:00
When the time is "00:00:00"
Then the clock should look like
"""
Y
OOOO
OOOO
OOOOOOOOOOO
OOOO
"""


Scenario: Middle of the afternoon
When the time is "13:17:01"
Then the clock should look like
"""
O
RROO
RRRO
YYROOOOOOOO
YYOO
"""

Scenario: Just before midnight
When the time is "23:59:59"
Then the clock should look like
"""
O
RRRR
RRRO
YYRYYRYYRYY
YYYY
"""

Scenario: Midnight 24:00
When the time is "24:00:00"
Then the clock should look like
"""
Y
RRRR
RRRR
OOOOOOOOOOO
OOOO
"""

Feature: The Berlin Clock
As a clock enthusiast
I want to tell the time using the Berlin Clock
So that I can increase the number of ways that I can read the time
Scenario: Midnight 00:00
When the time is "00:00:00"
Then the clock should look like
"""
Y
OOOO
OOOO
OOOOOOOOOOO
OOOO
"""
Scenario: Middle of the afternoon
When the time is "13:17:01"
Then the clock should look like
"""
O
RROO
RRRO
YYROOOOOOOO
YYOO
"""
Scenario: Just before midnight
When the time is "23:59:59"
Then the clock should look like
"""
O
RRRR
RRRO
YYRYYRYYRYY
YYYY
"""
Scenario: Midnight 24:00
When the time is "24:00:00"
Then the clock should look like
"""
Y
RRRR
RRRR
OOOOOOOOOOO
OOOO
"""
Loading