Skip to content

configure title function with configurator #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fluent back to internal
  • Loading branch information
paul committed Sep 16, 2019
commit 2dc240cdba69f45f5aa4f6a290a163b6bf7e001d
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void TitleFunctionCanBeOverriden()
{
FooClass something = new FooClass();
var context = TestContext.GetContext(something);
context.FluentScanner = new TestStack.BDDfy.FluentScanner<FooClass>(something);
new FluentStepBuilder<FooClass>(something);
context.FluentScanner.SetCreateTitle((a, b, c, d, e) => new StepTitle("hallo"));
var story = something
.Given(_ => GivenWeMutateSomeState())
Expand All @@ -62,8 +62,8 @@ public void TitleFunctionCanBeOverridenAndUseParameters()

FooClass something = new FooClass();
var context = TestContext.GetContext(something);
context.FluentScanner = new TestStack.BDDfy.FluentScanner<FooClass>(something);
context.FluentScanner.SetCreateTitle((a, b, c, d, e) => new StepTitle(e + " " + c.Name + " " + string.Join(",", d.Select(arg => arg.Value).ToArray())));
new FluentStepBuilder<FooClass>(something);
context.FluentScanner.SetCreateTitle((a, b, c, d, e) => new StepTitle(e + " " + c.Name + " " + string.Join(",", d.Select(arg => arg.Value).ToArray())));
var story = something
.Given(_ => GivenWeMutateSomeState())
.When(_ => something.Sub.SomethingHappens())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ namespace TestStack.BDDfy
/// }
/// </code>
/// </example>
public class FluentScanner<TScenario> : IFluentScanner
internal class FluentScanner<TScenario> : IFluentScanner
where TScenario : class
{
private readonly List<Step> _steps = new List<Step>();
private readonly TScenario _testObject;
private readonly ITestContext _testContext;
private readonly MethodInfo _fakeExecuteActionMethod;
private Func<string, bool, MethodInfo, StepArgument[], string, StepTitle> _createTitle;
public FluentScanner(TScenario testObject)
internal FluentScanner(TScenario testObject)
{
_testObject = testObject;
_testContext = TestContext.GetContext(_testObject);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//using System;
//using System.Collections.Generic;
//using System.Reflection;
//using System.Text;

//namespace TestStack.BDDfy.Scanners.StepScanners.Fluent
//{
// public static class StepTitleExtension
// {
// public void void SetCreateTitle(this IFluentScanner fluentScanner,Func<string, bool, MethodInfo, StepArgument[], string, StepTitle> customCreateTitle);
// {
// fluentScanner.s
// }
// }
//}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace TestStack.BDDfy.Scanners.StepScanners
{
public static class SetTitleExtensionMethod
{

}
}