Is there a way to stop repetition of stepTextTemplate format strings, I know they could be stored in a field in the test class etc but wondering if there would by any added value to creating something like a [StepTextTemapate] attr? Just thinking out loud :)
rather than
.When(x => WhenIAdd(8), "When I add {0} to it")
.When(x => WhenIAdd(42), "When I add {0} to it")
.When(x => WhenIAdd(99), "When I add {0} to it")
where:
private void WhenIAdd(int num) ...
instead:
.When(x => WhenIAdd(8))
.When(x => WhenIAdd(42))
.When(x => WhenIAdd(99))
where:
[StepTextTemplate("When I add {0} to it")]
private void WhenIAdd(int num) ...