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

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -