Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Scanners.StepScanners.ExecutableAttribute.GwtAttributes;

namespace TestStack.BDDfy.Samples.Atm
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Samples.Atm
{
Expand Down
4 changes: 2 additions & 2 deletions Samples/TestStack.BDDfy.Samples/Atm/HtmlReportConfig.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using TestStack.BDDfy.Processors.Reporters.Html;
using TestStack.BDDfy.Processors;

namespace TestStack.BDDfy.Samples.Atm
{
Expand All @@ -7,7 +7,7 @@ namespace TestStack.BDDfy.Samples.Atm
/// </summary>
public class HtmlReportConfig : DefaultHtmlReportConfiguration
{
public override bool RunsOn(Core.Story story)
public override bool RunsOn(Story story)
{
return story.MetaData.Type.Namespace != null && story.MetaData.Type.Namespace.EndsWith("Atm");
}
Expand Down
3 changes: 1 addition & 2 deletions Samples/TestStack.BDDfy.Samples/BDDfyConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using NUnit.Framework;
using TestStack.BDDfy.Configuration;
using TestStack.BDDfy.Processors.Reporters.Html;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Samples.Atm;
using TestStack.BDDfy.Samples.TicTacToe;

namespace TestStack.BDDfy.Samples
{
Expand Down
2 changes: 0 additions & 2 deletions Samples/TestStack.BDDfy.Samples/BDDfy_Rocks.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Samples
{
Expand Down
1 change: 0 additions & 1 deletion Samples/TestStack.BDDfy.Samples/CustomTextReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Linq;
using System.Text;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Samples
{
Expand Down
2 changes: 0 additions & 2 deletions Samples/TestStack.BDDfy.Samples/TicTacToe/TicTacToe.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Samples.TicTacToe
{
Expand Down
2 changes: 0 additions & 2 deletions Samples/TestStack.BDDfy.Samples/TicTacToe/XWins.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Samples.TicTacToe
{
public class XWins : GameUnderTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using NUnit.Framework;
using System.Collections.Generic;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Arguments
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Arguments
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using NUnit.Framework;
using System.Collections.Generic;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Arguments
{
Expand Down
2 changes: 0 additions & 2 deletions TestStack.BDDfy.Tests/Configuration/BatchProcessorsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using System.Linq;
using TestStack.BDDfy.Configuration;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Processors.Reporters.Html;
using TestStack.BDDfy.Processors.Reporters.MarkDown;

namespace TestStack.BDDfy.Tests.Configuration
{
Expand Down
6 changes: 2 additions & 4 deletions TestStack.BDDfy.Tests/Configuration/CustomProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Configuration
namespace TestStack.BDDfy.Tests.Configuration
{
public class CustomProcessor : IProcessor
{
Expand All @@ -9,7 +7,7 @@ public ProcessType ProcessType
get { return ProcessType.BeforeReport; }
}

public void Process(Core.Story story)
public void Process(Story story)
{
}
}
Expand Down
11 changes: 5 additions & 6 deletions TestStack.BDDfy.Tests/Configuration/ProcessorPipelineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using NUnit.Framework;
using TestStack.BDDfy.Configuration;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Processors.Reporters;

namespace TestStack.BDDfy.Tests.Configuration
{
Expand All @@ -11,7 +10,7 @@ public class ProcessorPipelineTests
[Test]
public void ReturnsDefaultPipelineByDefault()
{
var processors = Configurator.Processors.GetProcessors(new Core.Story(null)).ToList();
var processors = Configurator.Processors.GetProcessors(new Story(null)).ToList();

Assert.IsTrue(processors.Any(p => p is ConsoleReporter));
Assert.IsTrue(processors.Any(p => p is StoryCache));
Expand All @@ -23,7 +22,7 @@ public void ReturnsDefaultPipelineByDefault()
public void DoesNotReturnConsoleReportWhenItIsDeactivated()
{
Configurator.Processors.ConsoleReport.Disable();
var processors = Configurator.Processors.GetProcessors(new Core.Story(null)).ToList();
var processors = Configurator.Processors.GetProcessors(new Story(null)).ToList();

Assert.IsFalse(processors.Any(p => p is ConsoleReporter));
Assert.IsTrue(processors.Any(p => p is StoryCache));
Expand All @@ -36,7 +35,7 @@ public void DoesNotReturnConsoleReportWhenItIsDeactivated()
public void DoesNotReturnConsoleReportForExcludedStories()
{
Configurator.Processors.ConsoleReport.RunsOn(s => s.MetaData != null);
var processors = Configurator.Processors.GetProcessors(new Core.Story(null)).ToList();
var processors = Configurator.Processors.GetProcessors(new Story(null)).ToList();

Assert.IsFalse(processors.Any(p => p is ConsoleReporter));
Configurator.Processors.ConsoleReport.RunsOn(s => true);
Expand All @@ -46,7 +45,7 @@ public void DoesNotReturnConsoleReportForExcludedStories()
public void DoesNotReturnTestRunnerWhenItIsDeactivated()
{
Configurator.Processors.TestRunner.Disable();
var processors = Configurator.Processors.GetProcessors(new Core.Story(null)).ToList();
var processors = Configurator.Processors.GetProcessors(new Story(null)).ToList();

Assert.IsTrue(processors.Any(p => p is ConsoleReporter));
Assert.IsFalse(processors.Any(p => p is TestRunner));
Expand All @@ -61,7 +60,7 @@ public void CanAddCustomProcessor()
var processors = Configurator
.Processors
.Add(() => new CustomProcessor())
.GetProcessors(new Core.Story(null)).ToList();
.GetProcessors(new Story(null)).ToList();

Assert.IsTrue(processors.Any(p => p is CustomProcessor));
Assert.IsTrue(processors.Any(p => p is StoryCache));
Expand Down
3 changes: 0 additions & 3 deletions TestStack.BDDfy.Tests/Configuration/TestRunnerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
using System.Linq;
using NUnit.Framework;
using TestStack.BDDfy.Configuration;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.ExecutableAttribute.GwtAttributes;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Tests.Configuration
{
Expand Down
4 changes: 1 addition & 3 deletions TestStack.BDDfy.Tests/Exceptions/ExceptionThrowingTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Linq;
using NUnit.Framework;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Tests.Exceptions
{
Expand Down Expand Up @@ -132,7 +130,7 @@ Scenario Scenario
}
}

Core.Story Story { get; set; }
Story Story { get; set; }

public void AssertTearDownMethodIsExecuted()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions.NotImplementedException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions.NotImplementedException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions.NotImplementedException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions.OtherExceptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions.OtherExceptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions.OtherExceptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Linq;
using NUnit.Framework;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Exceptions
{
Expand Down
2 changes: 0 additions & 2 deletions TestStack.BDDfy.Tests/FluentScanner/BDDfyUsingFluentApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using NUnit.Framework;
using System.Linq;
using TestStack.BDDfy.Configuration;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Tests.FluentScanner
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
using System.Globalization;
using System.Linq;
using System.Collections.Generic;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.ExecutableAttribute.GwtAttributes;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;

namespace TestStack.BDDfy.Tests.FluentScanner
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using NUnit.Framework;
using System.Linq;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.FluentScanner
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using NSubstitute;
using NUnit.Framework;
using TestStack.BDDfy.Processors.Reporters;
using TestStack.BDDfy.Processors.Reporters.Diagnostics;
using TestStack.BDDfy.Processors.Reporters.Serializers;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Tests.Processors.Reports;

namespace TestStack.BDDfy.Tests.Processors.Diagnostics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
using NSubstitute;
using NUnit.Framework;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Processors.Reporters;
using TestStack.BDDfy.Processors.Reporters.Diagnostics;
using TestStack.BDDfy.Processors.Reporters.Writers;

namespace TestStack.BDDfy.Tests.Processors.Diagnostics
{
Expand All @@ -21,7 +18,7 @@ public void ShouldCreateReportIfProcessingSucceeds()
var sut = CreateSut();
_builder.CreateReport(Arg.Any<FileReportModel>()).Returns("Report Data");

sut.Process(new List<Core.Story>());
sut.Process(new List<Story>());

_writer.Received().OutputReport("Report Data", Arg.Any<string>(), Arg.Any<string>());
}
Expand All @@ -32,7 +29,7 @@ public void ShouldPrintErrorInReportIfProcessingFails()
var sut = CreateSut();
_builder.CreateReport(Arg.Any<FileReportModel>()).Returns(x => { throw new Exception("Error occurred."); });

sut.Process(new List<Core.Story>());
sut.Process(new List<Story>());

_writer.Received().OutputReport("There was an error compiling the json report: Error occurred.",
Arg.Any<string>(), Arg.Any<string>());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using TestStack.BDDfy.Processors.Reporters;
using TestStack.BDDfy.Processors.Reporters.Diagnostics;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Tests.Processors.Reports;

namespace TestStack.BDDfy.Tests.Processors.Diagnostics
Expand All @@ -11,7 +10,7 @@ namespace TestStack.BDDfy.Tests.Processors.Diagnostics
public class WhenBuildingReportDiagnostics
{
private DiagnosticsReportBuilder _sut;
private IEnumerable<Core.Story> _stories;
private IEnumerable<Story> _stories;
private IList<StoryDiagnostic> _result;

public void GivenADiagnosticsReportBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
using System.Text.RegularExpressions;
using NUnit.Framework;
using TestStack.BDDfy.Processors;
using TestStack.BDDfy.Processors.Reporters;
using TestStack.BDDfy.Processors.Reporters.MarkDown;
using TestStack.BDDfy.Scanners.StepScanners.ExecutableAttribute.GwtAttributes;

namespace TestStack.BDDfy.Tests.Processors.Reports.MarkDown
{
[TestFixture]
public class MarkDownReportBuilderSpecs
{
private MarkDownReportBuilder _sut;
private IEnumerable<Core.Story> _stories;
private IEnumerable<Story> _stories;
private string[] _result;

[Given("Given a MarkDownReportBuilder")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
using System.Collections.Generic;
using NSubstitute;
using NUnit.Framework;
using TestStack.BDDfy.Processors.Reporters;
using TestStack.BDDfy.Processors.Reporters.MarkDown;
using TestStack.BDDfy.Processors.Reporters.Writers;
using TestStack.BDDfy.Processors;

namespace TestStack.BDDfy.Tests.Processors.Reports.MarkDown
{
Expand All @@ -20,7 +18,7 @@ public void ShouldCreateReportIfProcessingSucceeds()
var sut = CreateSut();
_builder.CreateReport(Arg.Any<FileReportModel>()).Returns("Report Data");

sut.Process(new List<Core.Story>());
sut.Process(new List<Story>());

_writer.Received().OutputReport("Report Data", Arg.Any<string>(), Arg.Any<string>());
}
Expand All @@ -31,7 +29,7 @@ public void ShouldPrintErrorInReportIfProcessingFails()
var sut = CreateSut();
_builder.CreateReport(Arg.Any<FileReportModel>()).Returns(x => { throw new Exception("Error occurred."); });

sut.Process(new List<Core.Story>());
sut.Process(new List<Story>());

_writer.Received().OutputReport(
Arg.Is<string>(s => s.StartsWith("Error occurred.")),
Expand Down
9 changes: 4 additions & 5 deletions TestStack.BDDfy.Tests/Processors/Reports/ReportTestData.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
using System;
using System.Collections.Generic;
using TestStack.BDDfy.Core;

namespace TestStack.BDDfy.Tests.Processors.Reports
{
public class ReportTestData
{
public IEnumerable<Core.Story> CreateTwoStoriesEachWithTwoScenariosWithThreeStepsOfFiveMilliseconds()
public IEnumerable<Story> CreateTwoStoriesEachWithTwoScenariosWithThreeStepsOfFiveMilliseconds()
{
var storyMetaData1 = new StoryMetaData(typeof(RegularAccountHolderStory), "As a person", "I want ice cream", "So that I can be happy", "Happiness");
var storyMetaData2 = new StoryMetaData(typeof(GoldAccountHolderStory), "As an account holder", "I want to withdraw cash", "So that I can get money when the bank is closed", "Account holder withdraws cash");
var stories = new List<Core.Story>()
var stories = new List<Story>()
{
new Core.Story(storyMetaData1, GetScenarios()),
new Core.Story(storyMetaData2, GetScenarios())
new Story(storyMetaData1, GetScenarios()),
new Story(storyMetaData2, GetScenarios())
};

return stories;
Expand Down
Loading