Skip to content

Commit 3e5b1ab

Browse files
author
Jake Ginnivan
committed
Removed Category, fixes #118
1 parent 34dd87e commit 3e5b1ab

3 files changed

Lines changed: 10 additions & 17 deletions

File tree

TestStack.BDDfy/BDDfyExtensions.cs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ public static class BDDfyExtensions
1111
/// </summary>
1212
/// <param name="testObject">The test object representing a scenario.</param>
1313
/// <param name="scenarioTitle">Overrides the default scenario title and is displayed in the reports.</param>
14-
/// <param name="reportFilename">Used for filename in Html reports. Has no effect on console reports.</param>
1514
/// <returns></returns>
16-
public static Story BDDfy(this object testObject, string scenarioTitle = null, string reportFilename = null)
15+
public static Story BDDfy(this object testObject, string scenarioTitle = null)
1716
{
18-
return testObject.LazyBDDfy(scenarioTitle, reportFilename).Run();
17+
return testObject.LazyBDDfy(scenarioTitle).Run();
1918
}
2019

21-
public static Engine LazyBDDfy(this object testObject, string scenarioTitle = null, string reportFilename = null)
20+
public static Engine LazyBDDfy(this object testObject, string scenarioTitle = null)
2221
{
23-
return InternalLazyBDDfy(testObject, scenarioTitle, reportFilename);
22+
return InternalLazyBDDfy(testObject, scenarioTitle);
2423
}
2524

2625
/// <summary>
@@ -29,24 +28,22 @@ public static Engine LazyBDDfy(this object testObject, string scenarioTitle = nu
2928
/// <typeparam name="TStory">The type representing the story.</typeparam>
3029
/// <param name="testObject">The test object representing a scenario.</param>
3130
/// <param name="scenarioTitle">Overrides the default scenario title and is displayed in the reports.</param>
32-
/// <param name="reportFilename">Used for filename in Html reports. Has no effect on console reports.</param>
3331
/// <returns></returns>
34-
public static Story BDDfy<TStory>(this object testObject, string scenarioTitle = null, string reportFilename = null)
32+
public static Story BDDfy<TStory>(this object testObject, string scenarioTitle = null)
3533
where TStory : class
3634
{
37-
return testObject.LazyBDDfy<TStory>(scenarioTitle, reportFilename).Run();
35+
return testObject.LazyBDDfy<TStory>(scenarioTitle).Run();
3836
}
3937

40-
public static Engine LazyBDDfy<TStory>(this object testObject, string scenarioTitle = null, string reportFilename = null)
38+
public static Engine LazyBDDfy<TStory>(this object testObject, string scenarioTitle = null)
4139
where TStory : class
4240
{
43-
return InternalLazyBDDfy(testObject, scenarioTitle, reportFilename, typeof(TStory));
41+
return InternalLazyBDDfy(testObject, scenarioTitle, typeof(TStory));
4442
}
4543

4644
static Engine InternalLazyBDDfy(
4745
object testObject,
4846
string scenarioTitle,
49-
string reportFilename,
5047
Type explicitStoryType = null)
5148
{
5249
var testContext = TestContext.GetContext(testObject);
@@ -55,7 +52,7 @@ static Engine InternalLazyBDDfy(
5552
testContext.FluentScanner.GetScanner(scenarioTitle, explicitStoryType) :
5653
GetReflectiveScanner(testContext, scenarioTitle, explicitStoryType);
5754

58-
return new Engine(reportFilename, storyScanner);
55+
return new Engine(storyScanner);
5956
}
6057

6158
static IScanner GetReflectiveScanner(ITestContext testContext, string scenarioTitle = null, Type explicitStoryType = null)

TestStack.BDDfy/Engine.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace TestStack.BDDfy
77
{
88
public class Engine
99
{
10-
private readonly string _reportFilename;
1110
private readonly IScanner _scanner;
1211

1312
static Engine()
@@ -23,16 +22,14 @@ static void CurrentDomain_DomainUnload(object sender, EventArgs e)
2322
}
2423
}
2524

26-
public Engine(string reportFilename, IScanner scanner)
25+
public Engine(IScanner scanner)
2726
{
28-
_reportFilename = reportFilename ?? "BDDfy";
2927
_scanner = scanner;
3028
}
3129

3230
public Story Run()
3331
{
3432
Story = _scanner.Scan();
35-
Story.ReportFilename = _reportFilename;
3633

3734
var processors = Configurator.Processors.GetProcessors(Story).ToList();
3835

TestStack.BDDfy/Story.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public Story(StoryMetadata metadata, params Scenario[] scenarios)
2424
/// Currently used only when scenario doesn't have a story and we use the namespace instead
2525
/// </summary>
2626
public string Namespace { get; set; }
27-
public string ReportFilename { get; set; }
2827
public IEnumerable<Scenario> Scenarios { get; private set; }
2928

3029
public Result Result

0 commit comments

Comments
 (0)