Skip to content

Commit 2f4f094

Browse files
committed
Merge pull request #112 from MehdiK/example-on-metro-report
Adding support for examples to metro report
2 parents 1e2e1da + 8fef0f9 commit 2f4f094

42 files changed

Lines changed: 1708 additions & 2106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Samples/TestStack.BDDfy.Samples/BDDfyConfiguration.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using NUnit.Framework;
22
using TestStack.BDDfy.Configuration;
33
using TestStack.BDDfy.Reporters.Html;
4-
using TestStack.BDDfy.Reporters.HtmlMetro;
54
using TestStack.BDDfy.Samples.Atm;
65

76
namespace TestStack.BDDfy.Samples
@@ -15,7 +14,7 @@ public void Config()
1514
Configurator.Processors.Add(() => new CustomTextReporter());
1615
Configurator.BatchProcessors.MarkDownReport.Enable();
1716
Configurator.BatchProcessors.DiagnosticsReport.Enable();
18-
Configurator.BatchProcessors.Add(new HtmlReporter(new AtmHtmlReportConfig(), new HtmlMetroReportBuilder()));
17+
Configurator.BatchProcessors.Add(new HtmlReporter(new AtmHtmlReportConfig(), new MetroReportBuilder()));
1918
}
2019
}
2120
}

TestStack.BDDfy.Tests/Configuration/BatchProcessorsTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Linq;
33
using TestStack.BDDfy.Configuration;
44
using TestStack.BDDfy.Reporters.Html;
5-
using TestStack.BDDfy.Reporters.HtmlMetro;
65
using TestStack.BDDfy.Reporters.MarkDown;
76

87
namespace TestStack.BDDfy.Tests.Configuration
@@ -12,7 +11,7 @@ public class BatchProcessorsTests
1211
{
1312
static bool MetroReportProcessorIsActive(IBatchProcessor batchProcessor)
1413
{
15-
return batchProcessor is HtmlReporter && ((HtmlReporter)batchProcessor).ReportBuilder is HtmlMetroReportBuilder;
14+
return batchProcessor is HtmlReporter && ((HtmlReporter)batchProcessor).ReportBuilder is MetroReportBuilder;
1615
}
1716

1817
[Test]

TestStack.BDDfy.Tests/Reporters/Html/ClassicReportBuilderTests.ShouldProduceExpectedHtml.approved.txt

Lines changed: 174 additions & 0 deletions
Large diffs are not rendered by default.

TestStack.BDDfy.Tests/Reporters/Html/ClassicReportBuilderTests.ShouldProduceExpectedHtmlWithExamples.approved.txt

Lines changed: 192 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.Runtime.CompilerServices;
3+
using NUnit.Framework;
4+
using TestStack.BDDfy.Reporters;
5+
using TestStack.BDDfy.Reporters.Html;
6+
7+
namespace TestStack.BDDfy.Tests.Reporters.Html
8+
{
9+
[TestFixture]
10+
public class ClassicReportBuilderTests
11+
{
12+
[Test]
13+
[MethodImpl(MethodImplOptions.NoInlining)]
14+
public void ShouldProduceExpectedHtml()
15+
{
16+
Func<FileReportModel> model = () =>
17+
new HtmlReportModel(new ReportTestData().CreateTwoStoriesEachWithOneFailingScenarioAndOnePassingScenarioWithThreeStepsOfFiveMilliseconds())
18+
{
19+
RunDate = new DateTime(2014, 3, 25, 11, 30, 5)
20+
};
21+
22+
var sut = new ClassicReportBuilder();
23+
ReportApprover.Approve(model, sut);
24+
}
25+
26+
[Test]
27+
[MethodImpl(MethodImplOptions.NoInlining)]
28+
public void ShouldProduceExpectedHtmlWithExamples()
29+
{
30+
Func<FileReportModel> model = () =>
31+
new HtmlReportModel(new ReportTestData().CreateTwoStoriesEachWithOneFailingScenarioAndOnePassingScenarioWithThreeStepsOfFiveMillisecondsAndEachHasTwoExamples())
32+
{
33+
RunDate = new DateTime(2014, 3, 25, 11, 30, 5)
34+
};
35+
36+
var sut = new ClassicReportBuilder();
37+
ReportApprover.Approve(model, sut);
38+
}
39+
}
40+
}

TestStack.BDDfy.Tests/Reporters/Html/HtmlReportBuilderTests.ShouldProduceExpectedHtml.approved.txt

Lines changed: 0 additions & 174 deletions
This file was deleted.

TestStack.BDDfy.Tests/Reporters/Html/HtmlReportBuilderTests.ShouldProduceExpectedHtmlWithExamples.approved.txt

Lines changed: 0 additions & 192 deletions
This file was deleted.

TestStack.BDDfy.Tests/Reporters/Html/HtmlReportBuilderTests.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

TestStack.BDDfy.Tests/Reporters/Html/LineEndingsScrubber.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)