Skip to content

Commit

Permalink
changed specification class to scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan gonzalez committed Feb 15, 2013
1 parent 9965741 commit bb81970
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Expand Up @@ -2,9 +2,6 @@
[Bb]in/
[Oo]bj/

# mstest test results
TestResults

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

Expand Down
2 changes: 1 addition & 1 deletion Given.Common/StoryAttribute.cs
Expand Up @@ -27,6 +27,6 @@ public string SoThat
set { _soThat = value; }
}

public bool IsValid { get { return !string.IsNullOrEmpty(_asA); } }
public bool IsValid { get { return !string.IsNullOrEmpty(_asA) && !string.IsNullOrEmpty(_want); } }
}
}
3 changes: 1 addition & 2 deletions Given.Common/TestRun.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace Given.Common
{
Expand All @@ -16,7 +15,7 @@ public TestRun()

public void AddTest(TestStateManager testStateManager, Type type)
{
var story = new Story((StoryAttribute)type.GetCustomAttributes(typeof (StoryAttribute), true).FirstOrDefault() ?? new StoryAttribute()) ;
var story = new Story((StoryAttribute)type.GetCustomAttributes(typeof(StoryAttribute), true).FirstOrDefault() ?? new StoryAttribute());

if (!_stories.Any(x => x.Equals(story)))
_stories.Add(story);
Expand Down
2 changes: 1 addition & 1 deletion Given.NUnit.Example/when_building_a_ford.cs
Expand Up @@ -6,7 +6,7 @@ namespace Given.NUnit.Example
[Story(AsA = "car manufacturer",
IWant = "a factory that makes the right cars",
SoThat = "I can make money")]
public class when_building_a_ford : Specification
public class when_building_a_ford : Scenario
{
static CarFactory _factory;
static Car _car;
Expand Down
2 changes: 1 addition & 1 deletion Given.NUnit.Example/when_building_a_toyota.cs
Expand Up @@ -6,7 +6,7 @@ namespace Given.NUnit.Example
[Story(AsA = "car manufacturer",
IWant = "a factory that makes the right cars",
SoThat = "I can make money")]
public class when_building_a_toyota : Specification
public class when_building_a_toyota : Scenario
{
static CarFactory _factory;
static Car _car;
Expand Down
2 changes: 1 addition & 1 deletion Given.NUnit/Given.NUnit.csproj
Expand Up @@ -58,7 +58,7 @@
<Compile Include="AssemblyFixtureAttribute.cs" />
<Compile Include="scenarioAttribute.cs" />
<Compile Include="thenAttribute.cs" />
<Compile Include="Specification.cs" />
<Compile Include="Scenario.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Given.NUnit/Specification.cs → Given.NUnit/Scenario.cs
Expand Up @@ -6,7 +6,7 @@
namespace Given.NUnit
{
[TestFixture]
public abstract class Specification
public abstract class Scenario
{
TestStateManager _testStateManager;

Expand Down

0 comments on commit bb81970

Please sign in to comment.