SpecFlow StepArgumentTransformation -


i have gherkin steps defined like:

when select '<currentuser>' 

in stepdefinitions, capture parameter , replace 1 session. use

stepargumenttransformation 

here

what regex expression can use capture between < , >

thanks

if understand requirement correctly don't think can want. reason there no transformation 1 type another, string in string out, won't able step argument transformation. think have couple of options. 1 use lookup the value session in each step. other create class can used in transform. this:

public class sessionvariable {     ...stuff }   [stepargumenttransformation] public sessionvaraible transformtosessionvariable(string input) {     ..create session variable input } 

then make step methods accept variable of type sessionvaraible

[when("i select '(.*)'")] public void wheniselect(sessionvaraible sessionvariable) {     ...whatever } 

Comments

Popular posts from this blog

java - Static nested class instance -

java - MvcUriComponentsBuilder and inccorect binding in Spring MVC -

c# - LINQ IQueryable returning same rows with skip and take -